ytdl-org / youtube-dl

Command-line program to download videos from YouTube.com and other video sites
http://ytdl-org.github.io/youtube-dl/
The Unlicense
131.79k stars 9.99k forks source link

RaiPlay extraction #31857

Open nette12 opened 1 year ago

nette12 commented 1 year ago

come estrarre i sottotitoli in italiano da:

https://www.raiplay.it/video/2020/06/Beauty-f1dbef50-b12f-41d1-a29a-982b0c95ab68.html

dirkf commented 1 year ago

how to extract Italian subtitles from: ...

From UK, both git master yt-dl and release yt-dlp say "No video formats found" for this show, even with --allow-unplayable-formats in the latter case. The media link redirects to a short "available only in Italy" video that the extractor recognises, causing it to ignore the video (silently).

The extractor should be looking at the JSON here, including this fragment:

{
  /* ... */
  'video': {
    'content_url': 'https://mediapolisvod.rai.it/relinker/relinkerServlet.htm?cont=mLLuNktAjJTot1xUGm1xQQeeqqEEqualeeqqEEqual',
    'duration': '00:26:39',
    'highlights': '',
    'subtitles': '',
    'subtitlesArray': [
      {
        'language': 'it',
        'label': 'Italiano',
        'url': '/dl/video/stl/BeautyITARai_subITRP.srt'
      }
    ],
    'subtitleList': [
      {
        'language': 'it',
        'label': 'Italiano',
        'url': '/dl/video/stl/BeautyITARai_subITRP.srt'
      }
    ]
  },
  /* ... */
}

In region, the media link should not redirect to the "available in Italy only" video and the subtitles should be found. If this isn't happening, please post your verbose log showing the command that isn't getting the subtitles.

Vangelis66 commented 1 year ago

In region, the media link should not redirect to the "available in Italy only" video and the subtitles should be found

... If OP is specifically interested in acquiring the subtitles, only, then, as per the JSON file above, the DIRECT link to the SRT subs is:

https://www.raiplay.it/dl/video/stl/BeautyITARai_subITRP.srt

1
00:01:04,760 --> 00:01:06,280
Le persone pensano che la bellezza

2
00:01:06,400 --> 00:01:07,920
sia qualcosa che si possa trovare

etc.

YMMV, but I was not geo-blocked when accessing that URI (from outside of Italy, that is 😜 ) ...