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

[Pornhub] Fixed like and dislike extraction #27234

Merged
merged 2 commits into from
Nov 28, 2020
Merged

[Pornhub] Fixed like and dislike extraction #27234

merged 2 commits into from
Nov 28, 2020

Conversation

JChris246
Copy link
Contributor

@JChris246 JChris246 commented Nov 28, 2020

Before submitting a pull request make sure you have:

In order to be accepted and merged into youtube-dl each piece of code must be in public domain or released under Unlicense. Check one of the following options:

  • I am the original author of this code and I am willing to release it under Unlicense
  • I am not the original author of this code but it is in public domain or released under Unlicense (provide reliable evidence)

What is the purpose of your pull request?

  • Bug fix
  • Improvement
  • New extractor
  • New feature

Description of your pull request and other information

Simply relaxed the regex for like and dislike count
closes #27227

@@ -346,9 +346,9 @@ def add_video_url(video_url):
view_count = self._extract_count(
r'<span class="count">([\d,\.]+)</span> [Vv]iews', webpage, 'view')
like_count = self._extract_count(
r'<span class="votesUp">([\d,\.]+)</span>', webpage, 'like')
r'<span[^>]+class="votesUp"[^>]+>([\d,\.]+)</span>', webpage, 'like')
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Second part should be allowed to be empty.

@dstftw dstftw merged commit f04cfe2 into ytdl-org:master Nov 28, 2020
@imba-tjd
Copy link
Contributor

imba-tjd commented Dec 9, 2020

I don't think this works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[PornHub] Pornhub unable to extract like and dislike count
3 participants