Python学习者
xiaofeng1qaz
这个作者很懒,什么都没留下…
展开
-
萌新的Python学习日记 - 爬虫无影 - 使用BeautifulSoup + css selector 抓取动态网页内容:Knewone
博客第二天测试页面:Knewone:https://knewone.com/discover?page=,目的:爬取第一区类的title,img,各对象href,工程内容:Python3.5,jupyter notebook工具包:requests, BeautifulSoup,time,pandas代码(可翻页):import requestsfrom bs4 import BeautifulS...原创 2018-03-15 22:21:04 · 959 阅读 · 0 评论 -
萌新的Python学习日记 - 爬虫无影 - 添加headers抓取动态网页内容:TripAdvisor(上)
博客第二天测试页面:TripAdvisor:https://www.tripadvisor.cn/Attractions-g60763-Activities-New_York_City_New_York.html#FILTERED_LIST,目的:爬取第一区类的title,img,cate,工程内容:Python3.5,jupyter notebook工具包:requests, Beautiful...原创 2018-03-15 22:20:58 · 473 阅读 · 0 评论 -
萌新的Python学习日记 - 爬虫无影 - 使用BeautifulSoup + urlretrieve 抓取并保存图片:weheartit
博客第三天测试页面:weheartit:https://weheartit.com/inspirations/taylorswift?page=1&scrolling=true&before=308888434,目的:爬取并存储页面上的图片,工程内容:Python3.5,jupyter notebook工具包:requests, BeautifulSoup,urllib.reque...原创 2018-03-16 21:41:22 · 813 阅读 · 0 评论 -
萌新的Python学习日记 - 爬虫无影 - 爬取豆瓣电影top250并入库:豆瓣电影top250
博客第九天测试页面:豆瓣电影 Top 250https://movie.douban.com/top250?start=0&filter=目的:抓取该页面中每部电影的名称,链接,评分,评语工程内容:Python3.5,jupyter notebook工具包:requests,BeautifulSoup代码(可翻页):import requestsfrom bs4 import Beauti...原创 2018-03-22 20:56:30 · 1065 阅读 · 0 评论 -
萌新的Python学习日记 - 爬虫无影 - 爬取58同城指定页面的内容:bj.58.com
博客第六天测试页面:58:http://bj.58.com/pbdn/?PGTID=0d305a36-0000-1b29-d7c1-bc8b28eaff0b&ClickID=5,目的:爬取页面中个人分类列表中每个对象的指定信息,工程内容:Python3.5,jupyter notebook工具包:requests, BeautifulSoup,代码(不可翻页):# 获取个人商户itemim...原创 2018-03-19 17:57:14 · 841 阅读 · 0 评论 -
萌新的Python学习日记 - 爬虫无影 - 使用BeautifulSoup + css selector 抓取自己想要网页内容
博客第一天测试页面:★豆瓣高分电影榜★ (上)9.7-8.6分:https://www.douban.com/doulist/240962/,目的:抓取该页面中每部电影的名称,图片链接,剧组信息,简介,评语工程内容:Python3.5,jupyter notebook工具包:urllib.request,BeautifulSoup代码(单页内容):from bs4 import Beautiful...原创 2018-03-14 13:34:41 · 1859 阅读 · 0 评论 -
萌新的Python学习日记 - 爬虫无影 - 爬取58二手车指定页面内容存储并查询:58二手车
博客第八天测试页面:58二手车:http://bj.58.com/ershouche/0/pn1/,目的:爬取前三页列表中每个对象的指定信息并存储,工程内容:Python3.5,jupyter notebook工具包:requests, BeautifulSoup,pymongo代码(前三页):import requestsimport pymongofrom bs4 import Beautif...原创 2018-03-21 08:26:31 · 1415 阅读 · 1 评论 -
关于爬虫时url去重的初步探讨(上)
博客第十五天测试内容:自己写init_add_request(spider,url:str)方法实现url去重(本次仅测试)工具:Python3.6,Pycharm,scrapy,工程内容: 1. 准备:# spider.pyimport scrapyfrom scrapy.http import Requestclass DuanDian(scrapy.Spider): ...原创 2018-03-28 11:20:29 · 956 阅读 · 0 评论