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] Accessing private videos #15951

Closed
Showster88 opened this issue Mar 22, 2018 · 2 comments
Closed

[pornhub] Accessing private videos #15951

Showster88 opened this issue Mar 22, 2018 · 2 comments

Comments

@Showster88
Copy link

@Showster88 Showster88 commented Mar 22, 2018

Please follow the guide below

  • You will be asked some questions and requested to provide some information, please read them carefully and answer honestly
  • Put an x into all the boxes [ ] relevant to your issue (like this: [x])
  • Use the Preview tab to see what your issue will actually look like

Make sure you are using the latest version: run youtube-dl --version and ensure your version is 2018.03.20. If it's not, read this FAQ entry and update. Issues with outdated version will be rejected.

  • I've verified and I assure that I'm running youtube-dl 2018.03.20

Before submitting an issue make sure you have:

  • At least skimmed through the README, most notably the FAQ and BUGS sections
  • Searched the bugtracker for similar issues including closed ones
  • Checked that provided video/audio/playlist URLs (if any) are alive and playable in a browser

What is the purpose of your issue?

  • Bug report (encountered problems with youtube-dl)
  • Site support request (request for adding support for a new site)
  • Feature request (request for a new functionality)
  • Question
  • Other

If the purpose of this issue is a bug report, site support request or you are not completely sure provide the full verbose output as follows:

Add the -v flag to your command line you run youtube-dl with (youtube-dl -v ), copy the whole output and insert it here. It should look similar to one below (replace it with your log inserted between triple ```):

C:\Users\Example>youtube-dl -v -s https://www.pornhub.com/view_video.php?viewkey=ph5a9bd27202a67&pkey=28913901 --cookies cookies.txt
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-v', '-s', 'https://www.pornhub.com/view_video.php?viewkey=ph5a9bd27202a67']
[debug] Encodings: locale cp1252, fs mbcs, out cp850, pref cp1252
[debug] youtube-dl version 2018.03.20
[debug] Python version 3.4.4 (CPython) - Windows-10-10.0.16299
[debug] exe versions: none
[debug] Proxy map: {}
[PornHub] ph5a9bd27202a67: Downloading webpage
ERROR: ph5a9bd27202a67: PornHub said: Sorry, but this video is private. You must be friends with abhater to view this video.

Traceback (most recent call last):
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpbt_jbnlh\build\youtube_dl\YoutubeDL.py", line 785, in extract_info
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpbt_jbnlh\build\youtube_dl\extractor\common.py", line 440, in extract
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpbt_jbnlh\build\youtube_dl\extractor\pornhub.py", line 135, in _real_extract
youtube_dl.utils.ExtractorError: ph5a9bd27202a67: PornHub said: Sorry, but this video is private. You must be friends with abhater to view this video.

'pkey' is not recognized as an internal or external command,
operable program or batch file.

--cookies example:

C:\Users\Example>youtube-dl --cookies Downloads\cookies.txt https://www.pornhub.com
[generic] www.pornhub: Requesting header
WARNING: Falling back on generic information extractor.
[generic] www.pornhub: Downloading webpage
[generic] www.pornhub: Extracting information
[download] Downloading playlist: Free Porn Videos & Sex Movies - Porno, XXX, Porn Tube | Pornhub
[generic] playlist Free Porn Videos & Sex Movies - Porno, XXX, Porn Tube | Pornhub: Collected 1 video ids (downloading 1 of them)
[download] Downloading video 1 of 1
Traceback (most recent call last):
File "main.py", line 19, in
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmph71axfm2\build\youtube_dl_init_.py", line 471, in main
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmph71axfm2\build\youtube_dl_init_.py", line 461, in _real_main
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmph71axfm2\build\youtube_dl\YoutubeDL.py", line 1989, in download
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmph71axfm2\build\youtube_dl\YoutubeDL.py", line 796, in extract_info
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmph71axfm2\build\youtube_dl\YoutubeDL.py", line 995, in process_ie_result
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmph71axfm2\build\youtube_dl\YoutubeDL.py", line 850, in process_ie_result
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmph71axfm2\build\youtube_dl\YoutubeDL.py", line 1623, in process_video_result
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmph71axfm2\build\youtube_dl\YoutubeDL.py", line 1896, in process_info
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmph71axfm2\build\youtube_dl\YoutubeDL.py", line 1835, in dl
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmph71axfm2\build\youtube_dl\downloader\common.py", line 364, in download
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmph71axfm2\build\youtube_dl\downloader\http.py", line 340, in real_download
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmph71axfm2\build\youtube_dl\downloader\http.py", line 109, in establish_connection
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmph71axfm2\build\youtube_dl\YoutubeDL.py", line 2199, in urlopen
File "C:\Python\Python34\lib\urllib\request.py", line 464, in open
File "C:\Python\Python34\lib\urllib\request.py", line 482, in _open
File "C:\Python\Python34\lib\urllib\request.py", line 442, in _call_chain
File "C:\Python\Python34\lib\urllib\request.py", line 1496, in data_open
File "C:\Python\Python34\lib\base64.py", line 554, in decodebytes
binascii.Error: Incorrect padding

Description of your issue, suggested solution and other information

I would like to know if downloading private videos (when you are NOT friends with the uploader) is possible? The link is alive; (https://www.pornhub.com/view_video.php?viewkey=ph59a5513ce257e&pkey=23117731). --cookies method does not seem to work either.

It might be a coding issue or there could simply be an obvious error I am overlooking.

I did a search but it could not find any matching repositories.

Thanks.

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Mar 22, 2018

Can watch in browser = can download with browser's cookies.

@dstftw dstftw closed this Mar 22, 2018
@Showster88
Copy link
Author

@Showster88 Showster88 commented Mar 22, 2018

Is there any method to bypass this or can it only be done with videos you have access to?

Thanks.

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

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.