mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2025-08-23 06:35:51 -07:00
lint fix
This commit is contained in:
parent
81ace95c13
commit
3d102f2a9c
1 changed files with 3 additions and 4 deletions
|
@ -1525,15 +1525,14 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
|
||||||
lambda x: x['errorScreen']['playerErrorMessageRenderer'],
|
lambda x: x['errorScreen']['playerErrorMessageRenderer'],
|
||||||
dict) or {}
|
dict) or {}
|
||||||
reason = get_text(pemr.get('reason')) or playability_status.get('reason')
|
reason = get_text(pemr.get('reason')) or playability_status.get('reason')
|
||||||
if reason != None and reason.find("This video is only available to Music Premium members") >= 0:
|
if reason is not None and reason.find("This video is only available to Music Premium members") >= 0:
|
||||||
# accept only music premium
|
# accept only music premium
|
||||||
self.report_warning(reason.replace("video", "URL") + ". Using youtube mode instead of yt-music mode.", video_id)
|
self.report_warning(reason.replace("video", "URL") + ". Using youtube mode instead of yt-music mode.", video_id)
|
||||||
else:
|
else:
|
||||||
self.to_screen("Using yt-music.")
|
self.to_screen("Using yt-music.")
|
||||||
player_response = pr
|
player_response = pr
|
||||||
|
|
||||||
|
if player_response is None and webpage:
|
||||||
if player_response == None and webpage:
|
|
||||||
player_response = self._extract_yt_initial_variable(
|
player_response = self._extract_yt_initial_variable(
|
||||||
webpage, self._YT_INITIAL_PLAYER_RESPONSE_RE,
|
webpage, self._YT_INITIAL_PLAYER_RESPONSE_RE,
|
||||||
video_id, 'initial player response')
|
video_id, 'initial player response')
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue