Open AlexBlandin opened 5 years ago
[debug] User config: [] [debug] Custom config: [] [debug] Command-line args: [u'--verbose', u'-u', u'PRIVATE', u'-p', u'PRIVATE', u'--cookies', u'/home/dwin/Desktop/anime/funimation_cookies.txt', u'https://www.funimation.com/shows/kinos-journey-the-beautiful-world-the-animated-series/a-country-where-people-can-kill-others/uncut/?lang=english'] [debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8 [debug] youtube-dl version 2020.07.28 [debug] Python version 2.7.17 (CPython) - Linux-4.15.0-112-generic-x86_64-with-Ubuntu-18.04-bionic [debug] exe versions: ffmpeg 3.4.8, ffprobe 3.4.8, phantomjs 2.1.1, rtmpdump 2.4 [debug] Proxy map: {} [Funimation] Logging in [Funimation] a-country-where-people-can-kill-others: Downloading webpage [Funimation] 592163: Downloading JSON metadata ERROR: An extractor error has occurred. (caused by KeyError(u'items',)); 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 "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 530, in extract ie_result = self._real_extract(url) File "/usr/local/bin/youtube-dl/youtube_dl/extractor/funimation.py", line 117, in _real_extract })['items'] KeyError: u'items' Traceback (most recent call last): File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 797, in extract_info ie_result = ie.extract(url) File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 543, in extract raise ExtractorError('An extractor error has occurred.', cause=e) ExtractorError: An extractor error has occurred. (caused by KeyError(u'items',)); 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.
As @jnaypauer's #27845 (for the same issue) went AWOL for an unknown reason, I'll post my findings here.
Changing line 117 from:
})['items']
to:
})
import json
print(f"Sources: {json.dumps(sources, indent=4)}")
sources = sources['items']
and running
C:\Users\NobleKangaroo\Downloads\youtube-dl\youtube-dl>python3 __main__.py -u XXXXXXXX@XXX.XXX -p XXXXXXXX --cookies cookies.txt https://www.funimation.com/shows/black-butler/his-butler-able/
results in the following output:
Sources: {
"errors": [
{
"existingStreamDevice": "Web",
"code": 6,
"detail": "Uh oh! Your account is being accessed by too many devices. You can only stream to 1 screens at a time. To continue watching this video, stop playing video on one of the devices below:\nWeb",
"subscriptionProduct": {
"id": 1,
"title": "Free",
"description": "Free/basic user",
"tier": 10,
"streamLimit": 1,
"mostPopular": false,
"createdDatetime": "2019-04-16T14:38:48.936895Z",
"modifiedDatetime": "2019-08-12T20:56:52.208968Z"
},
"title": "Exceeded stream limit."
}
]
}
Simply put, free accounts can only have a single "screen" viewing at any given time. Before trying to download with youtube-dl, you need to close your browser window. I've also found that you may need to wait a minute or two for Funimation site to realize that the device isn't still streaming before the download will begin working.
Other thoughts: We could add a try ... except
to this and display any errors to the user.
@NobleKangaroo thanks for continuing here. My account is brand new and apparently got flagged somehow, which is probably why my original issue disappeared. I opened a support ticket and they said it's resolved, but I'm still flagged. Cool.
Anyways, I am having no such luck with your solution above. I do have a free account, but no amount of time in between obtaining my cookies file and closing the browser so that the website drops my viewing device works. I continue to get the exact same error KeyError('items',). Were you successful in "waiting" some time before downloading?
Thanks
Same issue. However, I was able to download one episode of a show but not the next.
Checklist
Verbose log
Description
Funimation pages are broken. Manually extracting the video URL still works.
Just a heads up.