【Python爬虫】爬虫示例---爬取必应美图壁纸(正则表达式)
我是新手小白,其中有许多不足之处望大家谅解。
引入time是因为,程序里面有多次requests get请求,再加上循环,如果下载量大,服务器和本机IP会受到影响。
前两天爬取58同城时,访问次数太多,IP被禁了。
import requests
import re
import time
home_url='https://bing.ioliu.cn/?p='
add_str='https://bing.ioliu.cn/'
headers={
"User-Agent": "Mozilla/5.
原创
2021-12-30 11:53:17 ·
813 阅读 ·
0 评论