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

youtube-dl thinks there is no "host" at TenPlay #32925

Open
5 of 6 tasks
FlaminHat opened this issue Sep 5, 2024 · 19 comments · May be fixed by #31892
Open
5 of 6 tasks

youtube-dl thinks there is no "host" at TenPlay #32925

FlaminHat opened this issue Sep 5, 2024 · 19 comments · May be fixed by #31892

Comments

@FlaminHat
Copy link

FlaminHat commented Sep 5, 2024

Checklist

  • I'm reporting a broken site support issue
  • I've verified that I'm running youtube-dl version 2021.12.17
    ??? How do I download/install youtube-dl version 2021.12.17???
  • I've checked that all provided URLs are alive and playable in a browser
  • I've checked that all URLs and arguments with special characters are properly quoted or escaped
  • I've searched the bugtracker for similar bug reports including closed ones
  • I've read bugs section in FAQ

Verbose log

[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-v', '--no-check-certificate', 'https://10play.com.au/news/sydney/episode-2024/tpv240905xpwim', '-o', 'Ten News Sydney, September 5 (UNCUT).mp4', '--username', 'PRIVATE', '--password', 'PRIVATE']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2021.04.07
[debug] Python version 3.5.2 (CPython) - Darwin-17.7.0-x86_64-i386-64bit
[debug] exe versions: ffmpeg 4.4.4, ffprobe 4.4.4
[debug] Proxy map: {}
[TenPlay] Logging in
[TenPlay] tpv240905xpwim: Downloading JSON metadata
[TenPlay] tpv240905xpwim: Downloading JSON metadata
[TenPlay] 7590190000007830: Downloading JSON metadata
[TenPlay] 7590190000007830: Downloading webpage
ERROR: Unable to download webpage: <urlopen error no host given> (caused by URLError('no host given',))
  File "/..../youtube-dl/youtube_dl/extractor/common.py", line 634, in _request_webpage
    return self._downloader.urlopen(url_or_request)
  File "/..../youtube-dl/youtube_dl/YoutubeDL.py", line 2279, in urlopen
    return self._opener.open(req, timeout=self._socket_timeout)
  File "/Users/..../miniconda3/lib/python3.5/urllib/request.py", line 464, in open
    req = meth(req)
  File "/Users/..../miniconda3/lib/python3.5/urllib/request.py", line 1176, in do_request_
    raise URLError('no host given')

Description

(I LIVE IN AUSTRALIA)
The video in the URL plays OK once I log in with my account. The same version of youtube-dl worked OK on this site yesterday. But now it's giving me an error message saying there is no "host"

@niklasfriberg
Copy link

niklasfriberg commented Sep 5, 2024

To download and install the latest version you can run.
youtube_dl --update

@FlaminHat
Copy link
Author

It looks like you installed youtube-dl with a package manager, pip, setup.py or a tarball. Please use that to update.

How do I do that?

@niklasfriberg
Copy link

It looks like you installed youtube-dl with a package manager, pip, setup.py or a tarball. Please use that to update.

How do I do that?

How did you install youtube-dl in the first place?
If you used pip you can run:
pip install --upgrade youtube-dl

@FlaminHat
Copy link
Author

Here's what happens when I enter that command:

WARNING: Ignoring invalid distribution -rllib3 (/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages)
WARNING: Ignoring invalid distribution -ertifi (/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages)
WARNING: Ignoring invalid distribution -rllib3 (/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages)
WARNING: Ignoring invalid distribution -ertifi (/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages)
Requirement already satisfied: youtube-dl in /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages (2021.12.17)
WARNING: Ignoring invalid distribution -rllib3 (/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages)
WARNING: Ignoring invalid distribution -ertifi (/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages)
WARNING: Ignoring invalid distribution -rllib3 (/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages)
WARNING: Ignoring invalid distribution -ertifi (/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages)
WARNING: Ignoring invalid distribution -rllib3 (/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages)
WARNING: Ignoring invalid distribution -ertifi (/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages)

@dirkf
Copy link
Contributor

dirkf commented Sep 5, 2024

Pls review #30839 as asked to learn how to install a valid up-to-date version of the program.

But almost surely, updating won't fix this problem which has also been reported at yt-dlp. Back-porting the 10Play extractor including the proposed fix for this issue should do so, and might also address at least some of the points listed in this status report.

@FlaminHat
Copy link
Author

FlaminHat commented Sep 6, 2024

How do I "back-port the 10Play extractor"??

@dirkf
Copy link
Contributor

dirkf commented Sep 6, 2024

You follow the developer instructions in the manual; or someone else does.

Basically, fork this repository, check out the latest master and make a new git branch; then put the existing yt-dl module and the updated yt-dlp module side-by-side and pull the changes into the yt-dl module, allowing for the different conventions and dependencies that apply. Once the extractor tests pass locally, the author pushes the branch with its committed changes to the fork, where the tests are run automatically on all the supported platforms. After any further updating, the branch can be proposed as a Pull Request to update this repo. If the author needs help (say, to understand how the conventions and dependencies differ between yt-dl and yt-dlp) or a design review earlier on, a draft PR can be made when the new version is not yet working or only partially working.

The author should also review PR #31892 to see if anything from that PR should be included.

@dirkf dirkf linked a pull request Sep 11, 2024 that will close this issue
11 tasks
@dirkf
Copy link
Contributor

dirkf commented Sep 11, 2024

So I did that, and now it's in PR #31892, waiting for some Oz-based testing.

@FlaminHat
Copy link
Author

How do I install the version with the 10play-fixing patch in order to test it?

@dirkf
Copy link
Contributor

dirkf commented Sep 14, 2024

There are some suggestions in the PR.

@FlaminHat
Copy link
Author

FlaminHat commented Sep 16, 2024

Replaced /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/yt_dlp/extractor/tenplay.py with the one from the Pull Request.

GOOD NEWS: No more URL host error, and the files download and come out intact as before.

@dirkf
Copy link
Contributor

dirkf commented Sep 16, 2024

I don't think it was in doubt that the extractor from the yt-dlp PR worked. Are you saying that the extractor module from #31892 also works with yt-dlp?

If so that would indeed be good, though not entirely surprising, but either way I would appreciate in-region testing as described in the PR.

I would still

@FlaminHat
Copy link
Author

I'm satisfied with the performance, I'm in Australia so what results would you like me to give?

@dirkf
Copy link
Contributor

dirkf commented Sep 17, 2024

What you described was patching yt-dlp (using Python 3.9), not the yt-dl installation shown in the original verbose log:

.../Library/.../python3.9/site-packages/yt_dlp/extractor/tenplay.py

vs (youtube-dl using Python 3.5):

... /..../youtube-dl/youtube_dl/extractor/common.py
...
... /Users/..../miniconda3/lib/python3.5/...

So no-one else could tell which tenplay.py you used: the one from #31892 or the one from the now merged yt-dlp/yt-dlp#10928.

If someone wants to test the yt-dl PR, I suggested how and what in the PR.

@FlaminHat
Copy link
Author

FlaminHat commented Sep 17, 2024

Using the python3 -m yt_dlp method, here are my results:

python -m youtube_dl -v --no-check-certificate https://10play.com.au/news/sydney/episode-2024/tpv240917ecubq -o "Ten News Sydney, September 17.mp4" --username [redacted] --password [redacted]
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-v', '--no-check-certificate', 'https://10play.com.au/news/sydney/episode-2024/tpv240917ecubq', '-o', 'Ten News Sydney, September 17.mp4', '--username', 'PRIVATE', '--password', 'PRIVATE']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2021.04.01
[debug] Python version 3.5.2 (CPython) - Darwin-17.7.0-x86_64-i386-64bit
[debug] exe versions: ffmpeg 4.4.4, ffprobe 4.4.4
[debug] Proxy map: {}
[TenPlay] tpv240917ecubq: Downloading JSON metadata
[TenPlay] 7540570000008025: Downloading webpage
ERROR: Unable to download webpage: HTTP Error 403: Forbidden (caused by <HTTPError 403: 'Forbidden'>); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
  File "/Users/...../miniconda3/lib/python3.5/site-packages/youtube_dl/extractor/common.py", line 634, in _request_webpage
    return self._downloader.urlopen(url_or_request)
  File "/Users/...../miniconda3/lib/python3.5/site-packages/youtube_dl/YoutubeDL.py", line 2279, in urlopen
    return self._opener.open(req, timeout=self._socket_timeout)
  File "/Users/....../miniconda3/lib/python3.5/urllib/request.py", line 472, in open
    response = meth(req, response)
  File "/Users/......./miniconda3/lib/python3.5/urllib/request.py", line 582, in http_response
    'http', request, response, code, msg, hdrs)
  File "/Users/......./miniconda3/lib/python3.5/urllib/request.py", line 510, in error
    return self._call_chain(*args)
  File "/Users/imac/miniconda3/lib/python3.5/urllib/request.py", line 444, in _call_chain
    result = func(*args)
  File "/Users/......./miniconda3/lib/python3.5/urllib/request.py", line 590, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)

The version of tenplay.py I used in replacing the old buggy version, and was successful with, was from: yt-dlp/yt-dlp#10928
(I checked Wherefrom: blob:https://github.com/918b9c60-c41a-490e-a51b-5012d7c54508)

The command I used was yt-dlp --no-check-certificate https://10play.com.au/news/sydney/episode-2024/tpv240917ecubq -o "Ten News Sydney, September 17.mp4" --username ..... --password .....

@dirkf
Copy link
Contributor

dirkf commented Sep 18, 2024

Unfortunately that doesn't help at all since it's testing yt-dlp. You seem to have switched programs from that shown in OP and so gone out of scope here.

@ghost
Copy link

ghost commented Sep 25, 2024

I have been watching this post waiting for a fix for this issue. I am happy to test but I can only test with yt-dlp.exe as I use this in a Windows command prompt. Let me know if there is an exe test version that I can try. The latest release of yt-dlp.exe from 6th Aug 2024 also returns the No Host Supplied error on 10Play.

@dirkf
Copy link
Contributor

dirkf commented Sep 25, 2024

The corresponding PR for yt-dlp has been merged. You can use it by installing the nightly build, I expect (--update-to-nightly?). The yt-dlp tracker is the place to look for your needs.

More relevant here, instructions for someone in-region to test our PR are given there. If you use a bundled yt-dl version, you'd need separate Python and git, or maybe just 7-Zip or similar, installations.

@ghost
Copy link

ghost commented Sep 25, 2024

I managed to find the nightly release for yt-dlp from 24th Sep 2024 and downloaded it. I tested it against 10Play and it resolves the issue with "No Host Supplied". Thanks for pointing me in the right direction and for the team who fixed the issue.

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 a pull request may close this issue.

3 participants