摘要: import urllib.request import requests from bs4 import BeautifulSoup url = "http://www.stats.gov.cn/tjsj/tjbz/tjyqhdmhcxhfdm/2018/12/1201.html" headers = ("User-Agent","Mozilla/5.0 (Windows NT 6.1) App 阅读全文
posted @ 2019-09-27 15:10 微客鸟窝 阅读(241) 评论(0) 推荐(0)
摘要: 1 from urllib.request import quote, unquote 2 import random 3 import requests 4 5 #quote 将单个字符串编码转化为 %xx 的形式 6 # strip() 方法用于移除字符串头尾指定的字符(默认为空格或换行符)或字符序列 7 baidu_cat = quote('总榜').strip(); 8... 阅读全文
posted @ 2019-09-27 15:09 微客鸟窝 阅读(819) 评论(0) 推荐(0)
/* 看板娘 */