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

[NSHW] Issue with encoding of special characters in download URL #15055

Closed
ytdl-issue opened this issue Dec 22, 2017 · 1 comment
Closed

[NSHW] Issue with encoding of special characters in download URL #15055

ytdl-issue opened this issue Dec 22, 2017 · 1 comment

Comments

@ytdl-issue
Copy link

@ytdl-issue ytdl-issue commented Dec 22, 2017

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 2017.12.14. 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 2017.12.14

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

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

The following sections concretize particular purposed issues, you can erase any section (the contents between triple ---) not applicable to your issue


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 ```):

youtube-dl -v  http://18pass.com/1704v/Trainers-AfterHours-Sex-Tape-Jenna-Ashley-XXX-HD-Videos.html
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'--ignore-config', u'-v', u'http://18pass.com/1704v/Trainers-AfterHours-Sex-Tape-Jenna-Ashley-XXX-HD-Videos.html']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2017.12.14
[debug] Python version 2.7.10 - Darwin-17.2.0-x86_64-i386-64bit
[debug] exe versions: ffmpeg 3.4.1, ffprobe 3.4.1
[debug] Proxy map: {}
[generic] Trainers-AfterHours-Sex-Tape-Jenna-Ashley-XXX-HD-Videos: Requesting header
WARNING: Falling back on generic information extractor.
[generic] Trainers-AfterHours-Sex-Tape-Jenna-Ashley-XXX-HD-Videos: Downloading webpage
[generic] Trainers-AfterHours-Sex-Tape-Jenna-Ashley-XXX-HD-Videos: Extracting information
[debug] Default format spec: bestvideo+bestaudio/best
[debug] Invoking downloader on u'https://scene-stream-ht.mofoscontent.com/2756/vids/hd/pop_jenna_ashley_lc082614_720p_3800.mp4?validfrom=1513955394&validto=1513983394&rs=2000&ri=4000&hash=GRaLwW9aF6XRC+Hxnk/ZHYSViD4='
ERROR: unable to download video data: HTTP Error 401: Unauthorized
Traceback (most recent call last):
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1893, in process_info
    success = dl(filename, info_dict)
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1832, in dl
    return fd.download(name, info)
  File "/usr/local/bin/youtube-dl/youtube_dl/downloader/common.py", line 361, in download
    return self.real_download(filename, info_dict)
  File "/usr/local/bin/youtube-dl/youtube_dl/downloader/http.py", line 286, in real_download
    establish_connection()
  File "/usr/local/bin/youtube-dl/youtube_dl/downloader/http.py", line 74, in establish_connection
    ctx.data = self.ydl.urlopen(request)
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 2196, in urlopen
    return self._opener.open(req, timeout=self._socket_timeout)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 437, in open
    response = meth(req, response)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 550, in http_response
    'http', request, response, code, msg, hdrs)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 475, in error
    return self._call_chain(*args)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 409, in _call_chain
    result = func(*args)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 558, in http_error_default
    raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
HTTPError: HTTP Error 401: Unauthorized


If the purpose of this issue is a site support request please provide all kinds of example URLs support for which should be included (replace following example URLs by yours):

Note that youtube-dl does not support sites dedicated to copyright infringement. In order for site support request to be accepted all provided example URLs should not violate any copyrights.


Description of your issue, suggested solution and other information

The download is faiing because the special characters in the hash at the end of the url are not being encoded correctly. If I type "https://scene-stream-ht.mofoscontent.com/2756/vids/hd/pop_jenna_ashley_lc082614_720p_3800.mp4?validfrom=1513955394&validto=1513983394&rs=2000&ri=4000&hash=GRaLwW9aF6XRC+Hxnk/ZHYSViD4=" into my browser, I get the same unauthorized error. However if I change the the hash to use ASCII encoding for "+", "/", and "=" in the hash, the url "https://scene-stream-ht.mofoscontent.com/2756/vids/hd/pop_jenna_ashley_lc082614_720p_3800.mp4?validfrom=1513955394&validto=1513983394&rs=2000&ri=4000&hash=GRaLwW9aF6XRC%2BHxnk%2FZHYSViD4%3D" works fine.

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Dec 23, 2017

PS C:\Dev\youtube-dl\master> py -3.6 .\youtube_dl\__main__.py http://18pass.com/1704v/Trainers-AfterHours-Sex-Tape-Jenna
-Ashley-XXX-HD-Videos.html
[generic] Trainers-AfterHours-Sex-Tape-Jenna-Ashley-XXX-HD-Videos: Requesting header
WARNING: Falling back on generic information extractor.
[generic] Trainers-AfterHours-Sex-Tape-Jenna-Ashley-XXX-HD-Videos: Downloading webpage
[generic] Trainers-AfterHours-Sex-Tape-Jenna-Ashley-XXX-HD-Videos: Extracting information
[download] Destination: Trainers AfterHours Sex Tape-Jenna Ashley-Pervs On Patrol -18Pass.CoM-Trainers-AfterHours-Sex-Tape-Jenna-Ashley-XXX-HD-Videos.mp4
[download]   0.1% of 1.00GiB at  1.02MiB/s ETA 16:40
ERROR: Interrupted by user
@dstftw dstftw closed this Dec 23, 2017
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.