摘要:
1 import requests 2 import re 3 import json 4 from requests.exceptions import RequestException 5 from multiprocessing import Pool 6 7 def get_one_page(url): 8 headers = { 9 "Use... 阅读全文
摘要:
json.dumps(contnet,+'\n') 阅读全文
摘要:
json.dumps(content,ensure_ascii=False) 阅读全文
摘要:
requests库解析时 r.encoding='utf-8' 阅读全文
摘要:
string1 = '\xa1\xa1\xb0\xe9' #GBK下显示为“ 伴” string2 = '\xb0\xa1\xa1\xe9' #GBK下显示为“啊¢” print string1.decode('GBK').replace(u'\u3000', u'') #输出“伴” print s 阅读全文