Merge pull request #1052 from popjdh/master

对GETCHU使用指定编码"EUC-JIS-2004"("EUC-JP"编码的超集)
This commit is contained in:
Yoshiko2
2023-07-21 03:09:46 +08:00
committed by GitHub

View File

@@ -69,7 +69,7 @@ class wwwGetchu(Parser):
def getHtml(self, url, type = None): def getHtml(self, url, type = None):
""" 访问网页(指定EUC-JP) """ 访问网页(指定EUC-JP)
""" """
resp = httprequest.get(url, cookies=self.cookies, proxies=self.proxies, extra_headers=self.extraheader, encoding='euc-jp', verify=self.verify, return_type=type) resp = httprequest.get(url, cookies=self.cookies, proxies=self.proxies, extra_headers=self.extraheader, encoding='euc_jis_2004', verify=self.verify, return_type=type)
if '<title>404 Page Not Found' in resp \ if '<title>404 Page Not Found' in resp \
or '<title>未找到页面' in resp \ or '<title>未找到页面' in resp \
or '404 Not Found' in resp \ or '404 Not Found' in resp \