mirror of
https://github.com/soimort/you-get.git
synced 2025-02-03 00:33:58 +03:00
[bilibili] quick hack for #2377 (enforce timeout 1)
This commit is contained in:
parent
d1c0810742
commit
5019d9d23f
@ -104,6 +104,8 @@ class Bilibili(VideoExtractor):
|
||||
self.parse_bili_xml(api_xml)
|
||||
|
||||
def prepare(self, **kwargs):
|
||||
socket.setdefaulttimeout(1) # fail fast, very speedy!
|
||||
|
||||
self.ua = fake_headers['User-Agent']
|
||||
self.url = url_locations([self.url])[0]
|
||||
frag = urllib.parse.urlparse(self.url).fragment
|
||||
|
Loading…
Reference in New Issue
Block a user