Skip to content

Commit

Permalink
[ie/cineverse] Detect when login required (yt-dlp#9081)
Browse files Browse the repository at this point in the history
Partially addresses yt-dlp#9072
Authored by: garret1317
  • Loading branch information
garret1317 authored Jan 31, 2024
1 parent a2bac6b commit fc2cc62
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion yt_dlp/extractor/cineverse.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,10 @@ def _real_extract(self, url):
html = self._download_webpage(url, video_id)
idetails = self._search_nextjs_data(html, video_id)['props']['pageProps']['idetails']

if idetails.get('err_code') == 1200:
err_code = idetails.get('err_code')
if err_code == 1002:
self.raise_login_required()
elif err_code == 1200:
self.raise_geo_restricted(
'This video is not available from your location due to geo restriction. '
'You may be able to bypass it by using the /details/ page instead of the /watch/ page',
Expand Down

0 comments on commit fc2cc62

Please sign in to comment.