python应用:爬虫实例(动态网页) 以爬取搜狗图片为例,网页特点:采用“瀑布流”的方式加载图片,图片的真实地址存放在XHR中 1#-*-coding:utf8-*-2importrequests3importurllib4importjson5importmath6importos78classSG:9def__init__(self,pic_num):10self.num =pic_num11self.user_agent ='Mozilla/5.0 (Window...
python应用:爬虫实例(静态网页) 爬取起点中文网某本小说实例: 1#-*-coding:utf8-*-2importrequests3importurllib4importurllib25frombs4importBeautifulSoup6importsys7reload(sys)8sys.setdefaultencoding('utf-8')#读写中文内容910classQDZW:11def__init__(self, url):12self.url = url#网址13self.user_agen...
python应用:爬虫实例(静态网页) 爬取起点中文网某本小说实例: 1#-*-coding:utf8-*-2importrequests3importurllib4importurllib25frombs4importBeautifulSoup6importsys7reload(sys)8sys.setdefaultencoding('utf-8')#读写中文内容910classQDZW:11def__init__(self, url):12self.url = url#网址13self.user_agen...