This commit is contained in:
XuanRan_Nyan authored and GitHub committed 2023-07-27 14:59:35 +00:00
1 parent 84c03f493d
commit 822b01de08
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -39,7 +39,7 @@ class DownloadBase:
'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
'Accept-Encoding': 'gzip, deflate',
'Accept-Language': 'zh-CN,zh;q=0.8,en-US;q=0.5,en;q=0.3',
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.159 Safari/537.36'
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.159 Safari/537.36',
}
self.default_output_args = [
+1 -1
View File
@@ -16,9 +16,9 @@ class Huya(DownloadBase):
def __init__(self, fname, url, suffix='flv'):
super().__init__(fname, url, suffix)
self.huya_danmaku = config.get('huya_danmaku', False)
self.fake_headers['Referer'] = 'https://www.huya.com/'
def check_stream(self):
logger.debug(self.fname)
try:
res = requests.get(self.url, timeout=5, headers=self.fake_headers)
res.close()