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

Fails download of SVT Play video (Traden Berattar S01E05) #9809

Closed
johan-westin-private opened this issue Jun 16, 2016 · 5 comments
Closed

Fails download of SVT Play video (Traden Berattar S01E05) #9809

johan-westin-private opened this issue Jun 16, 2016 · 5 comments
Assignees
Labels

Comments

@johan-westin-private
Copy link

@johan-westin-private johan-westin-private commented Jun 16, 2016

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 that [x])
  • Use Preview tab to see how your issue will actually look like

Make sure you are using the latest version: run youtube-dl --version and ensure your version is 2016.06.16. If it's not read this FAQ entry and update. Issues with outdated version will be rejected.

  • [x ] I've verified and I assure that I'm running youtube-dl 2016.06.16

Before submitting an issue make sure you have:

  • [ x] At least skimmed through README and most notably FAQ and BUGS sections
  • [ x] Searched the bugtracker for similar issues including closed ones

What is the purpose of your issue?

  • [ x] 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 -v flag to your command line you run youtube-dl with, copy the whole output and insert it here. It should look similar to one below (replace it with your log inserted between triple ```):

c:\temp>youtube-dl.exe -v http://www.svtplay.se/video/9170389/traden-berattar/traden-berattar-sasong-1-avsnitt-5/
[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['-v', 'http://www.svtplay.se/video/9170389/traden-berattar/traden-berattar-sasong-1-avsnitt-5/']
[debug] Encodings: locale cp1252, fs mbcs, out cp850, pref cp1252
[debug] youtube-dl version 2016.06.16
[debug] Python version 3.4.4 - Windows-10-10.0.14366
[debug] exe versions: none
[debug] Proxy map: {}
[SVTPlay] 9170389: Downloading JSON metadata
ERROR: 9170389: Failed to parse JSON  (caused by ValueError('Expecting value: line 1 column 1 (char 0)',)); 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 "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpxzf4ix2_\build\youtube_dl\extractor\common.py", line 544, in _parse_json
  File "C:\Python\Python34\lib\json\__init__.py", line 318, in loads
  File "C:\Python\Python34\lib\json\decoder.py", line 343, in decode
  File "C:\Python\Python34\lib\json\decoder.py", line 361, in raw_decode
ValueError: Expecting value: line 1 column 1 (char 0)
Traceback (most recent call last):
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpxzf4ix2_\build\youtube_dl\extractor\common.py", line 544, in _parse_json
  File "C:\Python\Python34\lib\json\__init__.py", line 318, in loads
  File "C:\Python\Python34\lib\json\decoder.py", line 343, in decode
  File "C:\Python\Python34\lib\json\decoder.py", line 361, in raw_decode
ValueError: Expecting value: line 1 column 1 (char 0)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpxzf4ix2_\build\youtube_dl\YoutubeDL.py", line 676, in extract_info
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpxzf4ix2_\build\youtube_dl\extractor\common.py", line 342, in extract
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpxzf4ix2_\build\youtube_dl\extractor\svt.py", line 124, in _real_extract
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpxzf4ix2_\build\youtube_dl\extractor\svt.py", line 14, in _extract_video
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpxzf4ix2_\build\youtube_dl\extractor\common.py", line 538, in _download_json
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpxzf4ix2_\build\youtube_dl\extractor\common.py", line 548, in _parse_json
youtube_dl.utils.ExtractorError: 9170389: Failed to parse JSON  (caused by ValueError('Expecting value: line 1 column 1 (char 0)',)); 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.

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


Description of your issue, suggested solution and other information

Failed to parse JSON

@chrille77
Copy link

@chrille77 chrille77 commented Jun 17, 2016

I have exactly the same issue. Not able to download anything from SVTPlay. Used to work just fine.

@bcoppens
Copy link

@bcoppens bcoppens commented Jun 18, 2016

It's also not a geo-restricted issue, since the worldwide-viewable videos also fail. For example, I was still able to fetch the following video on Wednesday, whereas it now fails:
http://www.svtplay.se/video/9184233/rapport/rapport-14-jun-19-30-textat
(These particular videos go offline after 7 days, though, so checking this particular link after Tuesday won't work in any case)

The issue appears that the URL that is used to fetch the JSON (in _real_extract of svt.py) now returns a regular HTML page, rather than only the JSON object. (Similar-looking information seems to be now imbedded in the root["__svtplay"] element in the page's javascript, though)

@yan12125 yan12125 added broken-IE and removed geo-restricted labels Jun 18, 2016
@yan12125 yan12125 self-assigned this Jun 18, 2016
@dstftw dstftw mentioned this issue Jun 19, 2016
0 of 4 tasks complete
@johan-westin-private
Copy link
Author

@johan-westin-private johan-westin-private commented Jun 19, 2016

Hi again, as far as I have tested NONE of the SVT streams are downloadable via youtube-dl.

Executing:
% youtube-dl -v -k -i http://www.svtplay.se/video/8169480/bron/bron-sasong-1-avsnitt-1
give the json_string (from youtube_dl/extractor/common.py", line 548, in _parse_json) HTML as attached.

json_string.zip

@johan-westin-private
Copy link
Author

@johan-westin-private johan-westin-private commented Jun 19, 2016

Hi,

Created a and attached a patch (sorry I am not familiar with pull requests) that at least handles:

% youtube-dl -v http://www.svtplay.se/video/8169480/bron/bron-sasong-1-avsnitt-1.

Regards,
Johan W
svt.patch.zip

@yan12125 yan12125 closed this in e4f90ea Jun 21, 2016
@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Jun 21, 2016

Thanks @johan-westin-private I've adapted your patch and SVTPlay should be fixed in the next version.

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
4 participants
You can’t perform that action at this time.