摘要: '''''' ''' 爬取豌豆荚app数据 - 请求url page2: https://www.wandoujia.com/wdjweb/api/category/more?catId=6001&subCatId=0&page=2&ctoken=vbw9lj1sRQsRddx0hD-XqCNF ''' import requests from bs4 import BeautifulSoup... 阅读全文
posted @ 2019-07-04 09:33 Zaccheooo 阅读(150) 评论(0) 推荐(0) 编辑
摘要: '''''' ''' find: 找第一个 find_all: 找所有 标签查找与属性查找: name 属性匹配 name 标签名 attrs 属性查找匹配 text 文本匹配 标签: - 字符串过滤器 字符串全局匹配 - 正则过滤器 ... 阅读全文
posted @ 2019-07-03 19:38 Zaccheooo 阅读(127) 评论(0) 推荐(0) 编辑
摘要: html_doc = """ The Dormouse's story $37 Once upon a time there were three little sisters; and their names were Elsie, Lacie and Tillie; and they lived at the bottom of a well. ... """ from bs4 impo... 阅读全文
posted @ 2019-07-03 19:37 Zaccheooo 阅读(124) 评论(0) 推荐(0) 编辑
摘要: ''' 初级版: form tank! ''' import time from selenium import webdriver from selenium.webdriver.common.keys import Keys driver = webdriver.Chrome() try: driver.implicitly_wait(10) #往京东发送请求 ... 阅读全文
posted @ 2019-07-03 10:48 Zaccheooo 阅读(143) 评论(0) 推荐(0) 编辑
摘要: from selenium import webdriver from selenium.webdriver import ActionChains from selenium.webdriver.common.keys import Keys #键盘按键操作 import time driver = webdriver.Chrome() try: driver.implicitly... 阅读全文
posted @ 2019-07-03 08:49 Zaccheooo 阅读(112) 评论(0) 推荐(0) 编辑
摘要: '''''' from selenium import webdriver # web驱动 from selenium.webdriver.common.keys import Keys # 键盘按键操作 import time import time driver = webdriver.Chrome() try: # 隐式等待: 需要在get之前调用 # 等待任意... 阅读全文
posted @ 2019-07-02 19:05 Zaccheooo 阅读(136) 评论(0) 推荐(0) 编辑
摘要: from selenium import webdriver # web驱动 from selenium.webdriver.common.by import By # 按照什么方式查找,By.ID,By.CSS_SELECTOR from selenium.webdriver.common.keys import Keys # 键盘按键操作 from selenium.webdriver... 阅读全文
posted @ 2019-07-02 18:59 Zaccheooo 阅读(99) 评论(0) 推荐(0) 编辑
摘要: ''' 爬取豆瓣电影信息: 电影排名、电影名称、电影url、电影导演 电影主演、电影年份、电影类型 电影评分、电影评论、电影简介 1.分析所有主页的url 第一页:https://movie.douban.com/top250?start=0&filter= 第二页:https://movie.douban.com/top250?start=25&filter= 第三页... 阅读全文
posted @ 2019-07-02 09:57 Zaccheooo 阅读(196) 评论(0) 推荐(0) 编辑
摘要: ''' POST请求自动登录github: 请求URL: https://github.com/session 请求方式: POST 请求头: Cookie User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (K... 阅读全文
posted @ 2019-07-01 16:50 Zaccheooo 阅读(134) 评论(0) 推荐(0) 编辑
摘要: # import requests ''' 爬取校花网视频: 一.请求url htt://www.xiaohuar.com/v/ 二.请求方式 GET 三.请求头信息 User-Agent:用户代理 ''' import time import requests # 爬虫三部曲 # 1.发送请求 def get_pag... 阅读全文
posted @ 2019-07-01 14:48 Zaccheooo 阅读(118) 评论(0) 推荐(0) 编辑