摘要:
import requests from bs4 import BeautifulSoup web='https://www.wandoujia.com/category/6001' web_g=requests.get(web) web_code=BeautifulSoup(web_g.text,'lxml') name=web_code.find_all(name='li',class_... 阅读全文
摘要:
from selenium import webdriver import time driver = webdriver.Chrome(r'C:\Users\Auraro\Desktop/chromedriver.exe') try: driver.implicitly_wait(20) driver.get('https://www.wandoujia.com/categ... 阅读全文
摘要:
''' find:找一个 find_all:找多个 标签查找与属性查找: 标签: - 字符串过滤器 字符串全局匹配 name 属性匹配 attrs 属性查找匹配 text 文本匹配 - 正则过滤器 re模块匹配 - 列表过滤器 ... 阅读全文
摘要:
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 imp... 阅读全文
摘要:
''' 安装解析器: pip3 install lxml 安装解析库: pip3 install bs4 ''' 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... 阅读全文
摘要:
''' 初级版 ''' import time from selenium import webdriver from selenium.webdriver.common.keys import Keys driver = webdriver.Chrome(r'C:\Users\Auraro\Desktop/chromedriver.exe') num = 1 try: drive... 阅读全文
摘要:
import time from selenium import webdriver browser = webdriver.Chrome() browser.get("https://www.baidu.com/") browser.get("https://www.taobao.com/") browser.get("https://www.sina.com/") # 后退 brows... 阅读全文
摘要:
from selenium import webdriver from selenium.webdriver import ActionChains from selenium.webdriver.common.keys import Keys # 键盘按键操作 import time driver = webdriver.Chrome(r'C:\Users\Auraro\Desktop/c... 阅读全文
摘要:
7.3日内容: 一、selenium剩余部分 二、BeautifulSoup4一、selenium剩余部分 -元素交互操作 1.点击、清除 2.Actions Chains 是一个动作链对象,需要把driver驱动传给它 动作链接对象可以操作一系列设定好的动作行为 3.frame切换 4.执行js代 阅读全文
摘要:
一、爬取豆瓣电影top250 1.爬取电影页 2.解析提取电影信息 3.保存数据 二、selenium请求库 -驱动浏览器往目标网站发送请求,获取响应数据 -不需要分析复杂通信流程 -执行js代码 -获取动态数据 三、怎么使用selenium -webdriver.Chorme() 打开驱动浏览器 阅读全文