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] Added support for PornHub Premium. #24063

Closed
wants to merge 2 commits into from

Conversation

twaddington
Copy link
Contributor

@twaddington twaddington commented Feb 17, 2020

Please follow the guide below

  • You will be asked some questions, please read them carefully and answer honestly
  • Put an x into all the boxes [ ] relevant to your pull request (like that [x])
  • Use Preview tab to see how your pull request will actually look like

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

Resolves #18797

This commit completely overhauls the PornHub extractor and adds a new
extractor for PornHub Premium. Several minor issues have been fixed with
the info extractor and support for international versions of PornHub
should be better.

Additionally, registered PornHub users can now authenticate and use
youtube-dl to archive videos they have purchased.

--netrc support has been added for both pornhub and pornhubpremium.

For simplicity, Thumbzilla has been split out into it's own extractor.

@@ -3523,7 +3523,7 @@ def str_to_int(int_str):
if isinstance(int_str, compat_integer_types):
return int_str
elif isinstance(int_str, compat_str):
int_str = re.sub(r'[,\.\+]', '', int_str)
int_str = re.sub(r'[,\.\s\+]', '', int_str)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This fixes view count parsing for international sites that use a space separator (e.g. fr.pornhub.com) as seen here:

Screen Shot 2020-02-16 at 4 22 25 PM

This change can easily be reverted if it causes problems.

@twaddington twaddington force-pushed the phpremium branch 5 times, most recently from 8a526d5 to a194bcc Compare February 17, 2020 18:06
@twaddington
Copy link
Contributor Author

If this is too large a change I can work on breaking it down into smaller pull-requests.

This commit completely refactors the PornHub extractor and adds a new
extractor for PornHub Premium. Several minor issues have been fixed with
the info extractor and support for international versions of PornHub
should be better.

Additionally, registered PornHub users can now authenticate and use
youtube-dl to archive videos they have purchased.

--netrc support has been added for both pornhub and pornhubpremium.
@twaddington
Copy link
Contributor Author

Closing as the maintainers are unlikely to ever accept a refactor like this. May try a more surgical implementation to see if I can get it accepted.

@twaddington twaddington closed this Mar 8, 2020
@twaddington twaddington deleted the phpremium branch April 9, 2020 16:14
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.

[Site Request] Pornhub Premium
1 participant