Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[porn91] fix extractor #21312

Merged
merged 2 commits into from
Jul 13, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
[porn91] fix extractor
  • Loading branch information
hrimfaxi committed Jun 6, 2019
commit dfa7f92ba30b1513f374f2d7f9287124af98cafe
7 changes: 6 additions & 1 deletion youtube_dl/extractor/porn91.py
Original file line number Diff line number Diff line change
@@ -39,7 +39,12 @@ def _real_extract(self, url):
r'<div id="viewvideo-title">([^<]+)</div>', webpage, 'title')
title = title.replace('\n', '')

info_dict = self._parse_html5_media_entries(url, webpage, video_id)[0]
video_link_url = self._search_regex(
r'<textarea[^>]+id=(["\'])fm-video_link\1[^>]*>(?P<video_link_url>[^<]+)</textarea>',
webpage, 'video_link_url', group='video_link_url')
videopage = self._download_webpage(video_link_url, video_id)

info_dict = self._parse_html5_media_entries(url, videopage, video_id)[0]

duration = parse_duration(self._search_regex(
r'时长:\s*</span>\s*(\d+:\d+)', webpage, 'duration', fatal=False))