[youtube] update self.ua (fix extraction)

This commit is contained in:
Mort Yao 2024-12-29 12:36:44 +01:00
parent ce1f930c43
commit 51a7eb5efc
No known key found for this signature in database
GPG Key ID: 07DA00CB78203251

View File

@ -206,7 +206,7 @@ class YouTube(VideoExtractor):
log.wtf(f'Server refused to provide video details. Returned status: {playerResponseStatus}.')
def prepare(self, **kwargs):
self.ua = 'Mozilla/5.0 (Linux; Android 15) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.6723.73 Mobile Safari/537.36'
self.ua = 'Mozilla/5.0 (iPad; CPU OS 16_7_10 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.6 Mobile/15E148 Safari/604.1,gzip(gfe)'
assert self.url or self.vid