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] Use download url to create proper upload date in filename #17574

Closed
mjolnir870 opened this issue Sep 14, 2018 · 0 comments
Closed

[PornHub] Use download url to create proper upload date in filename #17574

mjolnir870 opened this issue Sep 14, 2018 · 0 comments

Comments

@mjolnir870
Copy link

@mjolnir870 mjolnir870 commented Sep 14, 2018

Make sure you are using the latest version: run youtube-dl --version and ensure your version is 2018.09.10. 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.09.10

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 <your command line>), copy the whole output and insert it here. It should look similar to one below (replace it with your log inserted between triple ```):

[debug] System config: []
[debug] User config: []
[debug] Custom config: ['--no-mtime', '--no-playlist', '--playlist-reverse', '-i', '-w', '--sleep-interval', '5', '--max-sleep-interval', '7']
[debug] Command-line args: ['--config-location', 'C:\\Users\\USER\\Scripts\\youtube-dl-ondemand.conf', '--ffmpeg-location', 'C:\\Users\\USER\\Apps\\ffmpeg\\bin\\ffmpeg.exe', '-f', 'bestvideo+bestaudio/best', '--write-thumbnail', '--external-downloader', 'C:\\Users\\USER\\Apps\\aria2\\64bit\\aria2c.exe', '--external-downloader-args', '--file-allocation=none -x 4 -k 1M', '-o', 'M:\\test\\%(upload_date)s %(title)s_%(id)s.%(ext)s', '-v', 'https://www.pornhub.com/view_video.php?viewkey=ph5abe61446ade7']
[debug] Encodings: locale cp1252, fs mbcs, out cp437, pref cp1252
[debug] youtube-dl version 2018.09.10
[debug] Python version 3.4.4 (CPython) - Windows-8.1-6.3.9600
[debug] exe versions: ffmpeg N-90960-gbcff983dc3, ffprobe N-90960-gbcff983dc3
[debug] Proxy map: {}
[PornHub] ph5abe61446ade7: Downloading pc webpage
[PornHub] ph5abe61446ade7: Downloading thumbnail ...
[PornHub] ph5abe61446ade7: Writing thumbnail to: M:\test\NA Shooting it big time_ph5abe61446ade7.jpg
[debug] Invoking downloader on 'https://dv.phncdn.com/videos/201803/30/160174772/720P_1500K_160174772.mp4?ttl=1536954157&ri=1024000&rs=1336&hash=27fa07970e50d0438542065ffa76f204'
[download] Sleeping 5.70 seconds...
[download] Destination: M:\test\NA Shooting it big time_ph5abe61446ade7.mp4
[debug] aria2c.exe command line: "C:\Users\USER\Apps\aria2\64bit\aria2c.exe" -c "--file-allocation=none" -x 4 -k 1M --dir "M:\test" --out "NA Shooting it big time_ph5abe61446ade7.mp4.part" --header "User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:59.0) Gecko/20100101 Firefox/59.0" --header "Accept-Encoding: gzip, deflate" --header "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8" --header "Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7" --header "Accept-Language: en-us,en;q=0.5" "--check-certificate=true" -- "https://dv.phncdn.com/videos/201803/30/160174772/720P_1500K_160174772.mp4?ttl=1536954157&ri=1024000&rs=1336&hash=27fa07970e50d0438542065ffa76f204"

09/14 13:43:30 [NOTICE] Downloading 1 item(s)

09/14 13:43:31 [NOTICE] Download complete: M:/test/NA Shooting it big time_ph5abe61446ade7.mp4.part

Download Results:
gid   |stat|avg speed  |path/URI
======+====+===========+=======================================================
d8d88c|OK  |   4.2MiB/s|M:/test/NA Shooting it big time_ph5abe61446ade7.mp4.part


Status Legend:
(OK):download completed.
[aria2c] Downloaded 3293251 bytes
[download] 100% of 3.14MiB in 00:00

Description of your issue, suggested solution and other information

Using upload date as part of the filename does not currently work for PornHub. It returns as "NA". However, the download link for the URL (https://dv.phncdn.com/videos/201803/30/160174772/720P_1500K_160174772.mp4?ttl=1536954157&ri=1024000&rs=1336&hash=27fa07970e50d0438542065ffa76f204) does include a date as part of the path. The date for this video would be 20180330.

This log doesn't show me the URL used for the thumbnail, but from manually downloading in my browser thumbnail URLs look similar to this (https://ci.phncdn.com/videos/201803/30/160174772/original/(m=eaf8Ggaaaa)(mh=UmEnowyK5JLDUYr1)5.jpg). The date is available there as well to write the proper date for the thumbnail.

Can youtube-dl use this to write the upload date properly for PornHub?

@dstftw dstftw closed this in 3661ebf Sep 14, 2018
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
1 participant
You can’t perform that action at this time.