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

[France.tv] download fails with IndexError: list index out of range (not geo-restricted) #24929

Open
someziggyman opened this issue Apr 21, 2020 · 4 comments

Comments

@someziggyman
Copy link

@someziggyman someziggyman commented Apr 21, 2020

Checklist

  • I'm reporting a broken site support
  • I've verified that I'm running youtube-dl version 2020.03.24
  • I've checked that all provided URLs are alive and playable in a browser
  • I've checked that all URLs and arguments with special characters are properly quoted or escaped
  • I've searched the bugtracker for similar issues including closed ones

Verbose log

youtube-dl -v -F https://www.france.tv/france-3/l-opera-de-paris/969039-les-contes-d-hoffmann-d-offenbach-a-l-opera-de-paris.html
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'-v', u'-F', u'https://www.france.tv/france-3/l-opera-de-paris/969039-les-contes-d-hoffmann-d-offenbach-a-l-opera-de-paris.html']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2020.03.24
[debug] Python version 2.7.16 (CPython) - Darwin-18.7.0-x86_64-i386-64bit
[debug] exe versions: none
[debug] Proxy map: {}
[FranceTVSite] 969039-les-contes-d-hoffmann-d-offenbach-a-l-opera-de-paris: Downloading webpage
[FranceTV] a26f304c-0a9f-494f-9efd-daab5a69a6cf: Downloading video JSON
Traceback (most recent call last):
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 174, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/usr/local/bin/youtube-dl/__main__.py", line 19, in <module>
  File "/usr/local/bin/youtube-dl/youtube_dl/__init__.py", line 474, in main
  File "/usr/local/bin/youtube-dl/youtube_dl/__init__.py", line 464, in _real_main
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 2019, in download
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 808, in extract_info
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 870, in process_ie_result
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 797, in extract_info
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 530, in extract
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/francetv.py", line 209, in _real_extract
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/francetv.py", line 103, in _extract_video
IndexError: list index out of range

Description

This video is Not geo-restricted. Tried to search for the same issue. This seems to be a brand new one.

@willbeaufoy
Copy link
Contributor

@willbeaufoy willbeaufoy commented Apr 21, 2020

Seems to be something about this video specifically, as other pages work ok, e.g.

youtube-dl -v -F https://www.france.tv/series-et-fictions/series-comedies/parlement/saison-1/1404647-les-personnages-ingeborg.html

In this case info['videos'] is empty but it is not expected to be, thus we get IndexError: list index out of range for info['videos'][0].get('geoblocage').

I'm happy to look into this issue.

@someziggyman
Copy link
Author

@someziggyman someziggyman commented Apr 22, 2020

@willbeaufoy Yeah, curious case indeed... This one seems to have the same problem, though not geo-restricted:
https://www.france.tv/france-3/l-opera-de-paris/970585-symphonies-n-1-et-n-5-de-tchaikovski-a-l-opera-de-paris.html
Hope this can somehow be fixed.. Maybe, it's possible to ignore that "video index" value and just take whatever "video link" comes first? or it's not possible to fetch any links to video, if that counter equals to nothing? Sorry, if I sound a bit stupid, not much of a programmer here :-)

@willbeaufoy
Copy link
Contributor

@willbeaufoy willbeaufoy commented Apr 22, 2020

The problem is that there are no videos in the JSON response at all.

This is the raw JSON response from France.tv for your example:

https://sivideo.webservices.francetelevisions.fr/tools/getInfosOeuvre/v2/?idDiffusion=a26f304c-0a9f-494f-9efd-daab5a69a6cf

This is one that does work (from my previous comment):
https://sivideo.webservices.francetelevisions.fr/tools/getInfosOeuvre/v2/?idDiffusion=ae78a05d-78c2-11ea-afe2-000d3a2437a2&catalogue=

So the JSON just doesn't include any videos for your example. Is this the only one you've found that doesn't work? I'm not sure whether it is a problem with France.tv or youtube-dl.

@mdhooge
Copy link

@mdhooge mdhooge commented Apr 24, 2020

Maybe this could help — this is my “workaround”:
In Firefox, open the Network monitor (Ctrl-Shift-E) and filter on "Media" only. Then load the page.
The first line if of the kind https://ftvingest-vh.akamaihd.net/i/ingest/streaming-adaptatif/.../master.m3u8?audiotrack....
If you provide this URL to youtube-dl, it manages to download the raw (?) video & audio. I'm not sure whether this is re-encoded or not on the fly…

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.