mirror of
https://github.com/anxdpanic/plugin.video.youtube.git
synced 2026-04-27 07:41:00 -07:00
commit
f97ffbeba7
2 changed files with 2 additions and 7 deletions
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<addon id="plugin.video.youtube" name="YouTube" version="7.0.2~alpha2" provider-name="anxdpanic, bromix">
|
||||
<addon id="plugin.video.youtube" name="YouTube" version="7.0.2~alpha3" provider-name="anxdpanic, bromix">
|
||||
<requires>
|
||||
<import addon="xbmc.python" version="3.0.1"/>
|
||||
<import addon="script.module.requests" version="2.12.4"/>
|
||||
|
|
|
|||
|
|
@ -752,7 +752,7 @@ class VideoInfo(object):
|
|||
}
|
||||
|
||||
player_response = {}
|
||||
for attempt in range(4):
|
||||
for attempt in range(2):
|
||||
try:
|
||||
r = requests.post(video_info_url, params=params, json=payload,
|
||||
headers=headers, verify=self._verify, cookies=None,
|
||||
|
|
@ -764,11 +764,6 @@ class VideoInfo(object):
|
|||
if attempt == 0:
|
||||
payload['context']['client']['clientName'] = 'ANDROID_EMBEDDED_PLAYER'
|
||||
continue
|
||||
if attempt == 1:
|
||||
payload['context']['client']['clientName'] = 'ANDROID'
|
||||
del headers['Authorization']
|
||||
if attempt == 2:
|
||||
payload['context']['client']['clientName'] = 'ANDROID_EMBEDDED_PLAYER'
|
||||
except:
|
||||
error_message = 'Failed to get player response for video_id "%s"' % video_id
|
||||
self._context.log_error(error_message + '\n' + traceback.format_exc())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue