虾爬爬
Python爬虫
肖影儿
学习中
展开
-
Python获取豆瓣《斗罗大陆》500条热门短评写入excel
import pandas as pd import time import re from selenium import webdriver # 登录豆瓣获取cookies driver = webdriver.Chrome() driver.get('https://www.douban.com/') ## 切换iframe子框架 driver.switch_to.frame(driver.find_elements_by_tag_name("iframe")[0]) # driver.max.原创 2021-02-08 10:43:44 · 241 阅读 · 0 评论 -
Python获取豆瓣《狼殿下》200条热门短评写入excel
# 200条之后的评论需要登录才能查看,后续研究 # index需要修改 import urllib.request import re import pandas as pd headers = {'User-Agent', 'Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.186 Safari/537.36'} df = pd...原创 2020-12-21 14:14:41 · 146 阅读 · 0 评论