标签:ISE http request nbsp text raise encoding for add
import requests
def A():
try:
r=requests.get(url)
r.raise_for_status()
r.encoding=‘utf-8‘
return r.text
except:
return ""
url="https://baike.baidu.com/item/肖申克的救赎/30307?fr=aladdin"
print(A())
标签:ISE http request nbsp text raise encoding for add
原文地址:https://www.cnblogs.com/zjy614654231/p/12826069.html