标签:target requests idt com post request cells Nid encode
(2018-10-15) | ||
路 | 2018骞?10鏈?16鏃?8:30鈥斺€?11:00锛屽湪鍏垽涓€搴叕寮€瀹$悊锛氬啀瀹$敵璇?.. | (2018-10-15) |
路 | 2018骞?10鏈?16鏃?8:30鈥斺€?11:00锛屽湪鍏垽涓夊涵鍏紑瀹$悊锛氬啀瀹 |
res = requests.get(‘http://yczy.hljcourt.gov.cn/public/more.php?LocationID=0201000000‘)
res.encoding = res.apparent_encoding
print res.text.encode(‘iso-8859-9‘, ‘ignore‘).decode(‘gb2312‘, ‘ignore‘).encode(‘utf-8‘, ‘ignore‘) # 其中ignore表示忽略特殊字符
标签:target requests idt com post request cells Nid encode
原文地址:https://www.cnblogs.com/fanjp666888/p/9829070.html