爬虫
文章平均质量分 50
我是大伟
that's all
展开
-
python爬虫实现获取豆瓣图书的top250的信息-beautifulsoup实现
python实现,结果保存在同一目录下的douba.txt中使用beautifulsoup实现#coding=utf-8import urllib2from bs4 import BeautifulSoup#伪造的头,不知到有用否sendHeaders = { 'User-Agent':'Mozilla/5.3 (Windows NT 7.2; rv:18.0)原创 2016-08-27 19:11:24 · 1386 阅读 · 0 评论 -
拉勾网爬虫-python语言实现
以下实现拉勾网上面的北京python的招聘岗位的相关信息,包括公司名称,工资,公司简单介绍,公司地址初始页面为http://www.lagou.com/zhaopin/Python/?labelWords=label文件存储在同一个目录下的12345.txt中#coding=utf-8import urllib2from bs4 import BeautifulSoup#定义一个伪装的头文件原创 2016-08-26 17:14:34 · 1363 阅读 · 0 评论 -
scrapy中crwalspider源码分析
"""This modules implements the CrawlSpider which is the recommended spider to usefor scraping typical web sites that requires crawling pages.See documentation in docs/topics/spiders.rst"""impor原创 2017-09-08 22:23:38 · 1161 阅读 · 0 评论 -
百度文库爬虫之ppt爬虫
百度文库爬虫,目前实现其中的ppt的获取原创 2017-09-10 08:47:13 · 2655 阅读 · 2 评论 -
python3中将`&#x`(《新)的字符串转化为utf-8
对于网页中的《新编全注 ,正常情况下python3中能直接转化为utf-8,所以即使网页中显示的是这种escape sequence,获取到之后能够显示正常,但是偶尔也不好使,不好使的情况下可以使用如下方法解决:安装HTMLParser pip install HTMLParser修改HTMLParser的源码 修改imp原创 2017-10-17 22:51:17 · 3650 阅读 · 0 评论 -
网易云音乐爬虫
#coding=utf-8import timeimport jsonimport requestsimport pymongofrom pprint import pprintfrom lxml import etreefrom pymongo import MongoClientfrom selenium import webdriverfrom multiprocessin原创 2017-03-15 16:55:59 · 1585 阅读 · 1 评论 -
网易云音乐爬虫
# coding=utf-8import requestsfrom lxml import etreeimport refrom selenium import webdriverclass Music163: def __init__(self): self.start_url = "http://music.163.com/discover/playlist"原创 2017-11-23 16:27:05 · 737 阅读 · 0 评论