Skip to content

Commit

Permalink
[xhamster] Fix extraction (closes #24205)
Browse files Browse the repository at this point in the history
  • Loading branch information
dstftw committed Mar 1, 2020
1 parent 50d1989 commit b274e48
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion youtube_dl/extractor/xhamster.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def _real_extract(self, url):
display_id = mobj.group('display_id') or mobj.group('display_id_2')

desktop_url = re.sub(r'^(https?://(?:.+?\.)?)m\.', r'\1', url)
webpage = self._download_webpage(desktop_url, video_id)
webpage, urlh = self._download_webpage_handle(desktop_url, video_id)

error = self._html_search_regex(
r'<div[^>]+id=["\']videoClosed["\'][^>]*>(.+?)</div>',
Expand Down Expand Up @@ -161,6 +161,9 @@ def get_height(s):
'ext': determine_ext(format_url, 'mp4'),
'height': get_height(quality),
'filesize': filesize,
'http_headers': {
'Referer': urlh.geturl(),
},
})
self._sort_formats(formats)

Expand Down

0 comments on commit b274e48

Please sign in to comment.