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

DiscoveryGO.com - Can no longer download videos #11522

Closed
Mr-Jake opened this issue Dec 24, 2016 · 6 comments
Closed

DiscoveryGO.com - Can no longer download videos #11522

Mr-Jake opened this issue Dec 24, 2016 · 6 comments

Comments

@Mr-Jake
Copy link

@Mr-Jake Mr-Jake commented Dec 24, 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.12.22. If it's not read this FAQ entry and update. Issues with outdated version will be rejected.

  • I've verified and I assure that I'm running youtube-dl 2016.12.22

Before submitting an issue make sure you have:

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

What is the purpose of your issue?

  • 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:\>youtube-dl\youtube-dl.exe "https://www.discoverygo.com/alaska-the-last-frontier/homesteading-for-the-holidays/" -v
[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['https://www.discoverygo.com/alaska-the-last-frontier/homesteading-for-the-holidays/', '-v']
[debug] Encodings: locale cp1252, fs mbcs, out cp437, pref cp1252
[debug] youtube-dl version 2016.12.22
[debug] Python version 3.4.4 - Windows-XP-5.1.2600-SP3
[debug] exe versions: ffmpeg n3.1.2, ffprobe n3.1.2, rtmpdump 2.4
[debug] Proxy map: {}
[DiscoveryGo] homesteading-for-the-holidays: Downloading webpage
ERROR: homesteading-for-the-holidays: Failed to parse JSON  (caused by ValueError("Expecting ',' delimiter: line 1 column 24418 (char 24417)",)); 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\tmptqqgo4yk\build\youtube_dl\extractor\common.py", line 560, 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 359, in raw_decode
ValueError: Expecting ',' delimiter: line 1 column 24418 (char 24417)
Traceback (most recent call last):
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmptqqgo4yk\build\youtube_dl\extractor\common.py", line 560, 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 359, in raw_decode
ValueError: Expecting ',' delimiter: line 1 column 24418 (char 24417)

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\tmptqqgo4yk\build\youtube_dl\YoutubeDL.py", line 694, in extract_info
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmptqqgo4yk\build\youtube_dl\extractor\common.py", line 358, in extract
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmptqqgo4yk\build\youtube_dl\extractor\discoverygo.py", line 53, in _real_extract
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmptqqgo4yk\build\youtube_dl\extractor\common.py", line 564, in _parse_json
youtube_dl.utils.ExtractorError: homesteading-for-the-holidays: Failed to parse JSON  (caused by ValueError("Expecting ',' delimiter: line 1 column 24418 (char24417)",)); 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.

C:\>

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

https://www.discoverygo.com/alaska-the-last-frontier/homesteading-for-the-holidays/


Description of your issue, suggested solution and other information

youtube-dl can no longer download videos from discoverygo.com (animalplanetgo.com, sciencechannelgo.com, etc). I have posted the error log above. While most videos require a cable company login, I have posted a free video link that does not require a login. The last time youtube-dl was able to download from discoverygo.com was early December 2016.

@StevenDTX
Copy link

@StevenDTX StevenDTX commented Dec 26, 2016

Actually, it hasnt worked since early November. This is a duplicate of #11219

@Mr-Jake
Copy link
Author

@Mr-Jake Mr-Jake commented Dec 27, 2016

Thanks @StevenDTX

Did that "hack" work for you? I tried it without success. But I think I put it in the wrong line of common.py. It says line 559, but common.py was edited since then and I don't know what release that was intended for.

Would you or anyone else know under what line I would insert the "hack"?

Line 559 is in this function of common.py:

    def _parse_json(self, json_string, video_id, transform_source=None, fatal=True):
        if transform_source:
            json_string = transform_source(json_string)
        try:
            return json.loads(json_string)
        except ValueError as ve:
            errmsg = '%s: Failed to parse JSON ' % video_id
            if fatal:
                raise ExtractorError(errmsg, cause=ve)
            else:
                self.report_warning(errmsg + str(ve))

Code by KyleBS:

for i in xrange(json_string.count('"&lt;?xml version="1.0" encoding="UTF-8"?> <VAST')):
        start = json_string.find('"&lt;?xml version="1.0" encoding="UTF-8"?> <VAST')
        end = json_string.find('VAST> "') + len('VAST> "')
        json_string = json_string[:start] + json_string[end:]

@KyleBS
Copy link

@KyleBS KyleBS commented Dec 28, 2016

Updated the original comment to use 'git diff' -- should have the commit id I am on and a bit of context.

@breffasst
Copy link

@breffasst breffasst commented Dec 28, 2016

Thanks @KyleBS

I applied your diff and it works perfectly now.

@Mr-Jake
Copy link
Author

@Mr-Jake Mr-Jake commented Dec 29, 2016

Thanks @KyleBS for updating. The diff was easy to apply and DiscoveryGO now works with cookies.

yan12125 added a commit that referenced this issue Jan 5, 2017
HTMLParser, which is used by extract_attributes, already unescapes
attribute values with HTMLParser.unescape. They shouldn't be unescaped
again, to there may be parsing errors.

Ref: #11219, #11522
@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Jan 5, 2017

Yes this is a duplicate of #11219 and the latter is fixed and will be included in the next version.

@yan12125 yan12125 closed this Jan 5, 2017
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
5 participants
You can’t perform that action at this time.