zattoo.com/tv.salt.ch - youtube_dl.utils.RegexNotFoundError: Unable to extract app token
See original GitHub issueChecklist
- I’m reporting a broken site support issue
- I’ve verified that I’m running youtube-dl version 2021.03.25
- 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
First attempt on zattoo.com:
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['--username', 'PRIVATE', '--password', 'PRIVATE', '-v', '--verbose', 'https://zattoo.com/watch/w9suisse/212778329']
[debug] Encodings: locale UTF-8, fs utf-8, out utf-8, pref UTF-8
[debug] youtube-dl version 2021.03.25
[debug] Python version 3.9.2 (CPython) - macOS-11.2.3-x86_64-i386-64bit
[debug] exe versions: ffmpeg 4.3.2, ffprobe 4.3.2, rtmpdump 2.4
[debug] Proxy map: {}
[Zattoo] Downloading app token
ERROR: Unable to extract app token; 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.
Traceback (most recent call last):
File "/usr/local/Cellar/youtube-dl/2021.3.25/libexec/lib/python3.9/site-packages/youtube_dl/YoutubeDL.py", line 806, in wrapper
return func(self, *args, **kwargs)
File "/usr/local/Cellar/youtube-dl/2021.3.25/libexec/lib/python3.9/site-packages/youtube_dl/YoutubeDL.py", line 827, in __extract_info
ie_result = ie.extract(url)
File "/usr/local/Cellar/youtube-dl/2021.3.25/libexec/lib/python3.9/site-packages/youtube_dl/extractor/common.py", line 533, in extract
self.initialize()
File "/usr/local/Cellar/youtube-dl/2021.3.25/libexec/lib/python3.9/site-packages/youtube_dl/extractor/common.py", line 437, in initialize
self._real_initialize()
File "/usr/local/Cellar/youtube-dl/2021.3.25/libexec/lib/python3.9/site-packages/youtube_dl/extractor/zattoo.py", line 57, in _real_initialize
app_token = self._html_search_regex(
File "/usr/local/Cellar/youtube-dl/2021.3.25/libexec/lib/python3.9/site-packages/youtube_dl/extractor/common.py", line 1021, in _html_search_regex
res = self._search_regex(pattern, string, name, default, fatal, flags, group)
File "/usr/local/Cellar/youtube-dl/2021.3.25/libexec/lib/python3.9/site-packages/youtube_dl/extractor/common.py", line 1012, in _search_regex
raise RegexNotFoundError('Unable to extract %s' % _name)
youtube_dl.utils.RegexNotFoundError: Unable to extract app token; 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.
Second attempt on tv.salt.ch (rebranded zattoo), with the corresponding account:
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['--verbose', '--username', 'PRIVATE', '--password', 'PRIVATE', '-v', 'https://tv.salt.ch/watch/w9suisse/212741443']
[debug] Encodings: locale UTF-8, fs utf-8, out utf-8, pref UTF-8
[debug] youtube-dl version 2021.03.25
[debug] Python version 3.9.2 (CPython) - macOS-11.2.3-x86_64-i386-64bit
[debug] exe versions: ffmpeg 4.3.2, ffprobe 4.3.2, rtmpdump 2.4
[debug] Proxy map: {}
[SaltTV] Downloading app token
ERROR: Unable to extract app token; 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.
Traceback (most recent call last):
File "/usr/local/Cellar/youtube-dl/2021.3.25/libexec/lib/python3.9/site-packages/youtube_dl/YoutubeDL.py", line 806, in wrapper
return func(self, *args, **kwargs)
File "/usr/local/Cellar/youtube-dl/2021.3.25/libexec/lib/python3.9/site-packages/youtube_dl/YoutubeDL.py", line 827, in __extract_info
ie_result = ie.extract(url)
File "/usr/local/Cellar/youtube-dl/2021.3.25/libexec/lib/python3.9/site-packages/youtube_dl/extractor/common.py", line 533, in extract
self.initialize()
File "/usr/local/Cellar/youtube-dl/2021.3.25/libexec/lib/python3.9/site-packages/youtube_dl/extractor/common.py", line 437, in initialize
self._real_initialize()
File "/usr/local/Cellar/youtube-dl/2021.3.25/libexec/lib/python3.9/site-packages/youtube_dl/extractor/zattoo.py", line 57, in _real_initialize
app_token = self._html_search_regex(
File "/usr/local/Cellar/youtube-dl/2021.3.25/libexec/lib/python3.9/site-packages/youtube_dl/extractor/common.py", line 1021, in _html_search_regex
res = self._search_regex(pattern, string, name, default, fatal, flags, group)
File "/usr/local/Cellar/youtube-dl/2021.3.25/libexec/lib/python3.9/site-packages/youtube_dl/extractor/common.py", line 1012, in _search_regex
raise RegexNotFoundError('Unable to extract %s' % _name)
youtube_dl.utils.RegexNotFoundError: Unable to extract app token; 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.
Description
Retrieving Zattoo feeds doesn’t seem to work since at least 3-4 months because of this “Unable to extract app token” error. Issue https://github.com/ytdl-org/youtube-dl/issues/22258 from @Europe57 seems to be stuck, and even if there was a commit from @goggle about 1 month ago (https://github.com/goggle/youtube-dl-1/commit/49b4b838cb3b129d3adef071d3964e0c29d2eca4), it still doesn’t work (not sure if it is already in the actual release).
It would be really great if youtube-dl would work (again) with Zattoo-based feeds. Please feel free to send test/debug requests. Last try was on OS X but results were similar under Linux and the latest youtube-dl version. Thanks!
Issue Analytics
- State:
- Created 2 years ago
- Comments:11 (4 by maintainers)
Top GitHub Comments
Also, it seems quite possible and not terribly hard at a first sight:
/login
<script type="text/javascript" src="/app-64449d322222dd82e35b.js"></script>
/app-64449d322222dd82e35b.js
\"token-xxxxxxxxxx\"
there"/token.json"
for the rest of the process (untested yet).I’m not a python coder, so I’m not sure I can create a patch for this, but I will still try… Most probably you would be much faster here @goggle 😃
Corresponding c++ code in the pvr.zattoo source (https://github.com/rbuehlma/pvr.zattoo/blob/f7e15bebe655cb7c04324c8edc43db55ad59ece2/src/ZatData.cpp#L152)
If you replace
watch
withprogram
in the URL it should work with the version of my pull request (https://github.com/goggle/youtube-dl-1/commit/49b4b838cb3b129d3adef071d3964e0c29d2eca4).Here is the output:
To make it work on SaltTV I need access to an account.
Edit: I have just added support for these types of urls containing
watch
in to my PR: https://github.com/ytdl-org/youtube-dl/pull/28253/commits/951695e01917fb59c5bb1f8b66a95149922b94c9