Spiderbuf
爬虫练习
Python习题
技术文章
在线工具
捐赠
N01 - User-Agent与Referer校验反爬
发布日期:
1718095062
阅读数:799
coding=utf-8 import requests from lxml import etree url = ‘https://spiderbuf.cn/web-scraping-practice/user-agent-referrer’ myheaders = {‘User-Agent’:‘Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.164 Safari/537.36&rsqu...
E03 - 无序号翻页
发布日期:
1718095025
阅读数:667
coding=utf-8 import requests from lxml import etree import re base_url = ‘https://spiderbuf.cn/web-scraping-practice/scraping-random-pagination’ https://spiderbuf.cn/e03/5f685274073b myheaders = { ‘User-Agent’: ‘Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537....
E02 - 带验证码的登录爬取
发布日期:
1718094981
阅读数:774
coding=utf-8 import requests from lxml import etree url = ‘https://spiderbuf.cn/web-scraping-practice/web-scraping-with-captcha/list’ 注意:要把Cookie改成自己的 myheaders = {‘User-Agent’:‘Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0...
E01- 用户名密码登录爬取后台数据
发布日期:
1718094879
阅读数:1005
coding=utf-8 import requests from lxml import etree url = ‘https://spiderbuf.cn/web-scraping-practice/scraper-login-username-password/login’ myheaders = {‘User-Agent’:‘Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.164 ...
S08 - http post请求的数据爬取
发布日期:
1718094821
阅读数:944
coding=utf-8 import requests from lxml import etree url = ‘https://spiderbuf.cn/web-scraping-practice/scraper-via-http-post’ myheaders = {‘User-Agent’:‘Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.164 Safari/537.36&rs...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21