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

[grooveshark] Info dict cannot be converted to json #3860

Closed
jaimeMF opened this issue Sep 30, 2014 · 2 comments
Closed

[grooveshark] Info dict cannot be converted to json #3860

jaimeMF opened this issue Sep 30, 2014 · 2 comments

Comments

@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented Sep 30, 2014

The http_post_data field is a bytes object:

$ youtube-dl test:grooveshark --ignore-config --write-info-json --verbose
[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['test:grooveshark', '--ignore-config', '--write-info-json', '--verbose']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2014.09.29.2
[debug] Git HEAD: f8fb4a7
[debug] Python version 3.4.1 - Darwin-13.4.0-x86_64-i386-64bit
[debug] Proxy map: {}
[TestURL] Test URL: http://grooveshark.com/#!/s/Jolene+Tenth+Key+Remix+Ft+Will+Sessions/6SS1DW?src=5
[Grooveshark] 6SS1DW: Downloading player page
[Grooveshark] SWF Referer: http://grooveshark.com/static/JSQueue_20140923140621.swf
[Grooveshark] 6SS1DW: Downloading player bootstrap data
[Grooveshark] CommunicationToken: 593b5907599954833e68d3652787d0342933ab1f
[Grooveshark] Metadata URL: http://grooveshark.com/preload.php?hash=%2Fs%2FJolene%2BTenth%2BKey%2BRemix%2BFt%2BWill%2BSessions%2F6SS1DW&1412114443557
[Grooveshark] 6SS1DW: Downloading JSON metadata
[info] Writing video description metadata as JSON to: Jolene (Tenth Key Remix ft. Will Sessions)-6SS1DW.info.json
Traceback (most recent call last):
  File "~/local/bin/youtube-dl", line 4, in <module>
    youtube_dl.main()
  File "youtube_dl/__init__.py", line 431, in main
    _real_main(argv)
  File "youtube_dl/__init__.py", line 421, in _real_main
    retcode = ydl.download(all_urls)
  File "youtube_dl/YoutubeDL.py", line 1067, in download
    self.extract_info(url)
  File "youtube_dl/YoutubeDL.py", line 535, in extract_info
    return self.process_ie_result(ie_result, download, extra_info)
  File "youtube_dl/YoutubeDL.py", line 584, in process_ie_result
    extra_info=extra_info)
  File "youtube_dl/YoutubeDL.py", line 535, in extract_info
    return self.process_ie_result(ie_result, download, extra_info)
  File "youtube_dl/YoutubeDL.py", line 577, in process_ie_result
    return self.process_video_result(ie_result, download=download)
  File "youtube_dl/YoutubeDL.py", line 845, in process_video_result
    self.process_info(new_info)
  File "youtube_dl/YoutubeDL.py", line 977, in process_info
    write_json_file(info_dict, encodeFilename(infofn))
  File "youtube_dl/utils.py", line 264, in write_json_file
    json.dump(obj, tf)
  File "/usr/local/Cellar/python3/3.4.1_1/Frameworks/Python.framework/Versions/3.4/lib/python3.4/json/__init__.py", line 178, in dump
    for chunk in iterable:
  File "/usr/local/Cellar/python3/3.4.1_1/Frameworks/Python.framework/Versions/3.4/lib/python3.4/json/encoder.py", line 422, in _iterencode
    yield from _iterencode_dict(o, _current_indent_level)
  File "/usr/local/Cellar/python3/3.4.1_1/Frameworks/Python.framework/Versions/3.4/lib/python3.4/json/encoder.py", line 396, in _iterencode_dict
    yield from chunks
  File "/usr/local/Cellar/python3/3.4.1_1/Frameworks/Python.framework/Versions/3.4/lib/python3.4/json/encoder.py", line 429, in _iterencode
    o = _default(o)
  File "/usr/local/Cellar/python3/3.4.1_1/Frameworks/Python.framework/Versions/3.4/lib/python3.4/json/encoder.py", line 173, in default
    raise TypeError(repr(o) + " is not JSON serializable")
TypeError: b'streamKey=e126603b2ed99d0b0352c517ca5e40e1fa036d20_542b2f15_272c522_3c2766f_15122f2e3_1_0' is not JSON serializable
@pricejn2
Copy link

@pricejn2 pricejn2 commented Mar 11, 2015

+1. Still occurring with most recent youtube-dl version

youtube-dl --verbose -o '~/%(title)s_%(id)s_%(extractor)s.%(ext)s' --dump-json 'http://grooveshark.com/#!/s/Jolene+Tenth+Key+Remix+Ft+Will+Sessions/6SS1DW?src=5'
[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['--verbose', '-o', '~/%(title)s_%(id)s_%(extractor)s.%(ext)s', '--dump-json', 'http://grooveshark.com/#!/s/Jolene+Tenth+Key+Remix+Ft+Will+Sessions/6SS1DW?src=5']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2015.03.09
[debug] Python version 3.2.3 - Linux-3.14.32-xxxx-grs-ipv6-64-x86_64-with-Debian-7
[debug] exe versions: avconv 1.2.12, avprobe 1.2.12, ffmpeg 1.2.12, ffprobe 1.2.12, rtmpdump 2.4
[debug] Proxy map: {}
Traceback (most recent call last):
  File "/usr/local/bin/youtube-dl", line 9, in <module>
    load_entry_point('youtube-dl==2015.03.09', 'console_scripts', 'youtube-dl')()
  File "/usr/local/lib/python3.2/dist-packages/youtube_dl/__init__.py", line 403, in main
    _real_main(argv)
  File "/usr/local/lib/python3.2/dist-packages/youtube_dl/__init__.py", line 393, in _real_main
    retcode = ydl.download(all_urls)
  File "/usr/local/lib/python3.2/dist-packages/youtube_dl/YoutubeDL.py", line 1448, in download
    res = self.extract_info(url)
  File "/usr/local/lib/python3.2/dist-packages/youtube_dl/YoutubeDL.py", line 660, in extract_info
    return self.process_ie_result(ie_result, download, extra_info)
  File "/usr/local/lib/python3.2/dist-packages/youtube_dl/YoutubeDL.py", line 706, in process_ie_result
    return self.process_video_result(ie_result, download=download)
  File "/usr/local/lib/python3.2/dist-packages/youtube_dl/YoutubeDL.py", line 1149, in process_video_result
    self.process_info(new_info)
  File "/usr/local/lib/python3.2/dist-packages/youtube_dl/YoutubeDL.py", line 1255, in process_info
    self.to_stdout(json.dumps(info_dict))
  File "/usr/lib/python3.2/json/__init__.py", line 226, in dumps
    return _default_encoder.encode(obj)
  File "/usr/lib/python3.2/json/encoder.py", line 187, in encode
    chunks = self.iterencode(o, _one_shot=True)
  File "/usr/lib/python3.2/json/encoder.py", line 245, in iterencode
    return _iterencode(o, 0)
  File "/usr/lib/python3.2/json/encoder.py", line 169, in default
    raise TypeError(repr(o) + " is not JSON serializable")
TypeError: b'streamKey=c2eea2a411cb5d792ab4a48f52d1eadf82d3340f_5500473e_272c522_3c2766f_1800aa006_1_0' is not JSON serializable
@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented May 2, 2015

Unfortunately Grooveshark was shut down yesterday. See the announcement at http://grooveshark.com/. Closing.

@yan12125 yan12125 closed this May 2, 2015
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
3 participants
You can’t perform that action at this time.