会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
myrj
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
119
120
121
122
123
124
125
126
127
···
187
下一页
2021年10月29日
MYSQL海量数据导出到EXCEL
摘要: import pymysql import openpyxl import time def export_to_excel(worksheet, cursor, table): """ 将MySQL一个数据表导出到excel文件的一个表的函数 :param worksheet: 准备写入的exce
阅读全文
posted @ 2021-10-29 09:53 myrj
阅读(598)
评论(0)
推荐(0)
2021年10月26日
python 随机
摘要: #!/usr/bin/python # -*- coding: UTF-8 -*- import random import string # 随机整数: print random.randint(1,50) # 随机选取0到100间的偶数: print random.randrange(0, 10
阅读全文
posted @ 2021-10-26 06:16 myrj
阅读(105)
评论(0)
推荐(0)
2021年10月25日
python获取script里的内容
摘要: import requests from bs4 import BeautifulSoup url1 = "https://www.zzlian.com/33.html" html = requests.get(url1).content html=html.decode('utf-8') # py
阅读全文
posted @ 2021-10-25 06:16 myrj
阅读(945)
评论(0)
推荐(0)
2021年10月24日
python 网页编码 乱码
摘要: import requests,sys from bs4 import BeautifulSoup def gethml(url): rr=requests.get(url) s=rr.content s.decode("ISO-8859-1") return s html=gethml(url)
阅读全文
posted @ 2021-10-24 19:20 myrj
阅读(56)
评论(0)
推荐(0)
markupbast下载
摘要: 下载 markupbase
阅读全文
posted @ 2021-10-24 16:30 myrj
阅读(24)
评论(0)
推荐(0)
2021年10月21日
mysql 命令
摘要: select * from mm1 where ma not regexp '[ABCDEF]' 查询ma字段中不包含ABCDEF中任意字符的所有记录select * from mm1 where ma regexp '[ABCDEF]' 查询ma字段中包含ABCDEF中任意字符的所有记录selec
阅读全文
posted @ 2021-10-21 12:31 myrj
阅读(45)
评论(0)
推荐(0)
soup 查找网页所有A的href
摘要: url="https://www.liepin.com/campus/" import requests from bs4 import BeautifulSoup rr=requests.get(url) soup =BeautifulSoup(rr.text, "lxml") for itema
阅读全文
posted @ 2021-10-21 06:49 myrj
阅读(490)
评论(0)
推荐(0)
2021年10月20日
scrapy网址检索
摘要: url="https://www.liepin.com/job/1932123793.shtml" import requests from bs4 import BeautifulSoup rr=requests.get(url) soup =BeautifulSoup(rr.text, "lxm
阅读全文
posted @ 2021-10-20 20:42 myrj
阅读(202)
评论(0)
推荐(0)
python scrapy ERROR: Spider must return request, item, or None, got 'Tag' in解决方案
摘要: 今天写爬虫,遇到一个坑,提示[scrapy.core.scraper] ERROR: Spider must return request, item, or None, got 'Tag' in <GET https://www. 其实原因很意外,我在代码中使用了item,同时scrapy又用it
阅读全文
posted @ 2021-10-20 19:35 myrj
阅读(2990)
评论(0)
推荐(0)
2021年10月19日
SCRAPY 根据次数到时关闭爬虫
摘要: def __init__(self, *args, **kwargs): super(MmzzSpider, self).__init__(*args, **kwargs) # 这里是关键 self.count=0 def parse_item(self, response): soup =Beau
阅读全文
posted @ 2021-10-19 22:06 myrj
阅读(38)
评论(0)
推荐(0)
上一页
1
···
119
120
121
122
123
124
125
126
127
···
187
下一页
公告