File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -186,7 +186,7 @@ def check_playability_response(self, ytInitialPlayerResponse):
186
186
)
187
187
188
188
def prepare (self , ** kwargs ):
189
- self .ua = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64 ) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36 Edg/127.0.2651.86 '
189
+ self .ua = 'Mozilla/5.0 (Linux; Android 14 ) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.6533.103 Mobile Safari/537.36'
190
190
191
191
assert self .url or self .vid
192
192
@@ -202,7 +202,7 @@ def prepare(self, **kwargs):
202
202
203
203
# Extract from video page
204
204
logging .debug ('Extracting from the video page...' )
205
- video_page = get_content ('https://www.youtube.com/watch?v=%s' % self .vid )
205
+ video_page = get_content ('https://www.youtube.com/watch?v=%s' % self .vid , headers = { 'User-Agent' : self . ua } )
206
206
207
207
try :
208
208
jsUrl = re .search ('([^"]*/base\.js)"' , video_page ).group (1 )
You can’t perform that action at this time.
0 commit comments