摘要:
import requestsfrom lxml import etreeurl = 'https://www.kuaidaili.com/free/'headers = { 'User-Agent':'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) 阅读全文
摘要:
from urllib import parseimport lxmlimport requestsdef parse_url(): key_word = input('请输入关键字>>:') # 微博的url编码两次 key_word = parse.quote(key_word,encoding 阅读全文
摘要:
import requests# 使用proxies关键字response = requests.get('https://www.baidu.com', proxies={ # 'http':'http://114.101.18.169:65309', 'socks5':'http://114.1 阅读全文
摘要:
from urllib import parsekey_word = "中文"url = 'https://s.weibo.com/weibo/' + parse.quote(key_word,encoding='utf8')print(url)#https://s.weibo.com/weibo/ 阅读全文