Python爬虫学习(单线程爬虫(一))
来源:互联网 发布:带数据统计的二维码 编辑:程序博客网 时间:2024/05/21 11:17
import requestsimport reimport sysreload(sys)sys.setdefaultencoding("gb18030")type = sys.getfilesystemencoding()headers = {'User-Agent':'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.157 UBrowser/5.5.10106.5 Safari/537.36'}html = requests.get('http://jp.tingroom.com/yuedu/yd300p/',headers = headers)html.encoding = 'utf-8'#print html.text# Japanese = re.findall('color:#666666;">(.*?)</span>',html.text,re.S)# for each in Japanese:# print eachchinese = re.findall('color: #039;">(.*?)</a>',html.text,re.S)for each in chinese: print each
0 0
- Python爬虫学习(单线程爬虫(一))
- Python爬虫学习(单线程爬虫(二))
- Python爬虫(单线程爬虫(三))
- python单线程爬虫(一)
- Python爬虫入门学习--(单线程爬虫)
- python爬虫学习(一)
- python爬虫学习(一)
- Python 爬虫学习(一)
- Python爬虫学习(一)
- python-单线程爬虫
- python学习中一个单线程爬虫
- Python爬虫学习笔记(2)-单线程爬虫
- Python爬虫之<单线程爬虫>
- Python爬虫(一)
- Python爬虫(一)
- python爬虫(一)
- Python爬虫(一)
- python爬虫(一)
- OC+4-Foundation框架
- 【Java】javaIO之带缓冲流的字符流文件读写
- OC+5-Foundation续©&单例模式singleton
- hdu 5233 Gunner II【STL应用】【水题】
- S3C2440系统时钟
- Python爬虫学习(单线程爬虫(一))
- apache commons io 生成报告
- HDU-2133
- HDU2002
- 1047 Student List for Course
- poj_3080 Blue Jeans(KMP应用)
- linux4.3.2 块设备驱动简析-1
- ubuntu添加别名
- JavaScript基础精华03(String对象,Array对象,循环遍历数组,JS中的Dictionary,Array的简化声明)