Skip to content

Commit

Permalink
[eroprofile] Fix extraction (closes #23200, closes #23626, closes #29008
Browse files Browse the repository at this point in the history
)
  • Loading branch information
dstftw committed May 16, 2021
1 parent ef03721 commit 503a374
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions youtube_dl/extractor/eroprofile.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from ..compat import compat_urllib_parse_urlencode
from ..utils import (
ExtractorError,
unescapeHTML
merge_dicts,
)


Expand Down Expand Up @@ -77,19 +77,15 @@ def _real_extract(self, url):
[r"glbUpdViews\s*\('\d*','(\d+)'", r'p/report/video/(\d+)'],
webpage, 'video id', default=None)

video_url = unescapeHTML(self._search_regex(
r'<source src="([^"]+)', webpage, 'video url'))
title = self._html_search_regex(
r'Title:</th><td>([^<]+)</td>', webpage, 'title')
thumbnail = self._search_regex(
r'onclick="showVideoPlayer\(\)"><img src="([^"]+)',
webpage, 'thumbnail', fatal=False)
(r'Title:</th><td>([^<]+)</td>', r'<h1[^>]*>(.+?)</h1>'),
webpage, 'title')

return {
info = self._parse_html5_media_entries(url, webpage, video_id)[0]

return merge_dicts(info, {
'id': video_id,
'display_id': display_id,
'url': video_url,
'title': title,
'thumbnail': thumbnail,
'age_limit': 18,
}
})

0 comments on commit 503a374

Please sign in to comment.