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

[tunein] TuneIn does not work anymore (JSON parse error) #20252

Open
bubbleguuum opened this issue Mar 5, 2019 · 11 comments
Open

[tunein] TuneIn does not work anymore (JSON parse error) #20252

bubbleguuum opened this issue Mar 5, 2019 · 11 comments

Comments

@bubbleguuum
Copy link

$youtube-dl http://tun.in/sekNY -v
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'http://tun.in/sekNY', u'-v']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2019.03.01
[debug] Python version 2.7.15 (CPython) - Linux-4.20.10-1-default-x86_64-with-glibc2.2.5
[debug] exe versions: ffmpeg 4.1, ffprobe 4.1
[debug] Proxy map: {}
[tunein:shortener] sekNY: Downloading redirect page
[tunein:shortener] Following redirect: https://tunein.com/radio/Europe-1-1047-s6566/
[tunein:station] 6566: Downloading JSON metadata
ERROR: 6566: Failed to parse JSON  (caused by ValueError('No JSON object could be decoded',)); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
Traceback (most recent call last):
  File "/home/bobbie/bin/youtube-dl/youtube_dl/extractor/common.py", line 877, in _parse_json
    return json.loads(json_string)
  File "/usr/lib64/python2.7/json/__init__.py", line 339, in loads
    return _default_decoder.decode(s)
  File "/usr/lib64/python2.7/json/decoder.py", line 364, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib64/python2.7/json/decoder.py", line 382, in raw_decode
    raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
Traceback (most recent call last):
  File "/home/bobbie/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 794, in extract_info
    ie_result = ie.extract(url)
  File "/home/bobbie/bin/youtube-dl/youtube_dl/extractor/common.py", line 508, in extract
    ie_result = self._real_extract(url)
  File "/home/bobbie/bin/youtube-dl/youtube_dl/extractor/tunein.py", line 25, in _real_extract
    content_id, note='Downloading JSON metadata')
  File "/home/bobbie/bin/youtube-dl/youtube_dl/extractor/common.py", line 870, in _download_json
    expected_status=expected_status)
  File "/home/bobbie/bin/youtube-dl/youtube_dl/extractor/common.py", line 854, in _download_json_handle
    fatal=fatal), urlh
  File "/home/bobbie/bin/youtube-dl/youtube_dl/extractor/common.py", line 881, in _parse_json
    raise ExtractorError(errmsg, cause=ve)
ExtractorError: 6566: Failed to parse JSON  (caused by ValueError('No JSON object could be decoded',)); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
@bubbleguuum
Copy link
Author

The cause is that the base API URL http://tunein.com/tuner/tune/, does not work anymore at all, resulting in 404's. So it is likely that the tunein extractor must largely be rewritten.

@biwubo
Copy link
Contributor

biwubo commented Mar 26, 2019

Hi, I've opened a PR to address this issue (#20459). I would appreciate if you could see if it works for you and provide some feedback in comments section of that PR. Thanks

@bubbleguuum
Copy link
Author

Many thanks for this PR !
I confirm it works fine, left a comment in the PR.

@mike10191
Copy link

The new OSX version has this error, should this be a new issue?

$ youtube-dl --verbose https://tunein.com/radio/Europe-1-1047-s6566/
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'--verbose', u'https://tunein.com/radio/Europe-1-1047-s6566/']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2019.04.07
[debug] Python version 2.7.16 (CPython) - Darwin-18.2.0-x86_64-i386-64bit
[debug] exe versions: ffmpeg 4.1.3, ffprobe 4.1.3, rtmpdump 2.4
[debug] Proxy map: {}
[tunein:station] 6566: Downloading JSON metadata
ERROR: Unable to download JSON metadata: HTTP Error 404: Not Found (caused by HTTPError()); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type youtube-dl -U to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 626, in _request_webpage
return self._downloader.urlopen(url_or_request)
File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 2227, in urlopen
return self._opener.open(req, timeout=self._socket_timeout)
File "/usr/local/Cellar/python@2/2.7.16/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 435, in open
response = meth(req, response)
File "/usr/local/Cellar/python@2/2.7.16/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 548, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/local/Cellar/python@2/2.7.16/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 467, in error
result = self._call_chain(*args)
File "/usr/local/Cellar/python@2/2.7.16/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 407, in _call_chain
result = func(*args)
File "/usr/local/Cellar/python@2/2.7.16/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 654, in http_error_302
return self.parent.open(new, timeout=req.timeout)
File "/usr/local/Cellar/python@2/2.7.16/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 435, in open
response = meth(req, response)
File "/usr/local/Cellar/python@2/2.7.16/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 548, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/local/Cellar/python@2/2.7.16/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 473, in error
return self._call_chain(*args)
File "/usr/local/Cellar/python@2/2.7.16/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 407, in _call_chain
result = func(*args)
File "/usr/local/Cellar/python@2/2.7.16/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 556, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)

@biwubo
Copy link
Contributor

biwubo commented Apr 13, 2019

@mike10191 I get the same issue on linux using the master branch, a pull request has been created (#20459) which fixes the issue. I'm sure one of the maintainers will see to it when they have the time.

@mike10191
Copy link

@biwubo thanks for checking and for the request details

@MaximVol
Copy link

MaximVol commented Apr 14, 2019

Hello.
YoutubeDl also can't handle TuneIn podcasts, but error message is another: "Unsupported URL". Can support of podcasts be added to tunein module too?

youtube-dl --verbose https://tunein.com/podcasts/News--Politics-Podcasts/The-FOX-News-Rundown-p1056287/
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'--verbose', u'https://tunein.com/podcasts/News--Politics-Podcasts/The-FOX-News-Rundown-p1056287/']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2019.04.07
[debug] Python version 2.7.13 (CPython) - Linux-4.9.0-8-amd64-x86_64-with-debian-9.8
[debug] exe versions: ffmpeg 3.3.9, ffprobe 3.3.9
[debug] Proxy map: {}
[generic] The-FOX-News-Rundown-p1056287: Requesting header
WARNING: Falling back on generic information extractor.
[generic] The-FOX-News-Rundown-p1056287: Downloading webpage
[generic] The-FOX-News-Rundown-p1056287: Extracting information
ERROR: Unsupported URL: https://tunein.com/podcasts/News--Politics-Podcasts/The-FOX-News-Rundown-p1056287/
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/youtube_dl/extractor/generic.py", line 2337, in _real_extract
doc = compat_etree_fromstring(webpage.encode('utf-8'))
File "/usr/local/lib/python2.7/dist-packages/youtube_dl/compat.py", line 2551, in compat_etree_fromstring
doc = _XML(text, parser=etree.XMLParser(target=_TreeBuilder(element_factory=_element_factory)))
File "/usr/local/lib/python2.7/dist-packages/youtube_dl/compat.py", line 2540, in _XML
parser.feed(text)
File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1653, in feed
self._raiseerror(v)
File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1517, in _raiseerror
raise err
ParseError: syntax error: line 1, column 0
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/youtube_dl/YoutubeDL.py", line 796, in extract_info
ie_result = ie.extract(url)
File "/usr/local/lib/python2.7/dist-packages/youtube_dl/extractor/common.py", line 529, in extract
ie_result = self._real_extract(url)
File "/usr/local/lib/python2.7/dist-packages/youtube_dl/extractor/generic.py", line 3320, in _real_extract
raise UnsupportedError(url)
UnsupportedError: Unsupported URL: https://tunein.com/podcasts/News--Politics-Podcasts/The-FOX-News-Rundown-p1056287/

@bubbleguuum
Copy link
Author

bubbleguuum commented Apr 14, 2019

I really don't know what's up with maintainers and PRs. Do they ever look at them and merge some of them? There are more than 400 of them waiting at the moment and it is not a good sign.
So if you need tunein working now, you are better cloning this repo and merging @biwubo PR yourself.

@betathetatau
Copy link

Anyone know when this is slated to go public? Just found myself needing youtube-dl for tunein tonight...

@bubbleguuum
Copy link
Author

bubbleguuum commented Jun 6, 2019

Since committers seems to largely ignore PRs, you are better fetching the project and merging the PR in your copy..

@betathetatau
Copy link

Unfortunately, I can't. I was a programmer in the 1980s and 1990s. Current languages, compilers, and source management methods are sorcery to me. Alas, I'm old, and have to wait for the "kids" to release official binaries now.

Hope nothing is wrong with the youtube-dl project. There seemed to be multiple updates daily when I discovered it. They appear to be much further spaced now. Few tools I've found in recent memory have ever been such lifesavers for me. Ctrl-S used to be good for everything on the internet, until embedded media file and stream players came around. ytdl has restored my full fair use rights to save and archive and remember.

Thanks everyone.

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

No branches or pull requests

5 participants