Skip to content

Commit

Permalink
[cda] Improve extraction (closes #28709, closes #28937)
Browse files Browse the repository at this point in the history
  • Loading branch information
dstftw committed May 1, 2021
1 parent d1b9a5e commit a0df8a0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions youtube_dl/extractor/cda.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,8 @@ def _real_extract(self, url):
'age_limit': 18 if need_confirm_age else 0,
}

info = self._search_json_ld(webpage, video_id, default={})

# Source: https://www.cda.pl/js/player.js?t=1606154898
def decrypt_file(a):
for p in ('_XDDD', '_CDA', '_ADC', '_CXD', '_QWE', '_Q5', '_IKSDE'):
Expand Down Expand Up @@ -197,7 +199,7 @@ def extract_format(page, version):
handler = self._download_webpage

webpage = handler(
self._BASE_URL + href, video_id,
urljoin(self._BASE_URL, href), video_id,
'Downloading %s version information' % resolution, fatal=False)
if not webpage:
# Manually report warning because empty page is returned when
Expand All @@ -209,6 +211,4 @@ def extract_format(page, version):

self._sort_formats(formats)

info = self._search_json_ld(webpage, video_id, default={})

return merge_dicts(info_dict, info)

0 comments on commit a0df8a0

Please sign in to comment.