def _get_url(url, code='utf-8'): html_stream = get_urls_re(url, time=6) if True: html_stream.encoding = 'gb2312' else: html_stream.encoding = get_charset(html_stream.text) return html_stream
def _get_url(url, code='utf-8'): html_stream = get_urls_re(url, time = 6) if True: html_stream.encoding = "gb2312" else: html_stream.encoding = get_charset(html_stream.text) return html_stream
def _get_url(url, code='utf-8'): html_stream = get_urls_re(url, time = 6) if True: html_stream.encoding = 'GBK' else: html_stream.encoding = get_charset(html_stream.text) if html_stream.status_code != 200: return html_stream return html_stream