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

[pornhd] Added added like count to info dict #19123

Closed
wants to merge 11 commits into from
4 changes: 4 additions & 0 deletions youtube_dl/extractor/pornhd.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@ def _real_extract(self, url):
r"poster'?\s*:\s*([\"'])(?P<url>(?:(?!\1).)+)\1", webpage,
'thumbnail', fatal=False, group='url')

like_count = int_or_none(self._search_regex(
r'class="save-count">(\d+)<', webpage, 'like_count', fatal=False))

return {
'id': video_id,
'display_id': display_id,
Expand All @@ -94,4 +97,5 @@ def _real_extract(self, url):
'view_count': view_count,
'formats': formats,
'age_limit': 18,
'like_count': like_count,
}
2 changes: 1 addition & 1 deletion youtube_dl/extractor/pornhub.py
Original file line number Diff line number Diff line change
Expand Up @@ -446,4 +446,4 @@ def _real_extract(self, url):
break
entries.extend(page_entries)

return self.playlist_result(entries, user_id)
return self.playlist_result(entries, user_id)