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
130.13k stars 9.82k forks source link

Austrian Parliament videos #31081

Open alexlist opened 2 years ago

alexlist commented 2 years ago

Checklist

Example URLs

Overview of Parlament Mediathek:

https://www.parlament.gv.at/MEDIA/

Description

Parlament Mediathek provides live streams and recordings of meetings of the Austrian Parliament, both Nationalrat (first chamber) as well as Bundesrat (second chamber) as well as recordings of expert panels and other material.

Copyright check: Noncommercial use is permitted as long as the content isn't manipulated or uploaded elsewhere. See https://www.parlament.gv.at/DISC/index.shtml for full disclaimer.

Sorry that large parts of the site are only available in German, that's the official language in Austria.

Streaming and download work in Chrome

This is what I get from youtube-dl:

youtube-dl --verbose http://uvp-parlament.sf.apa.at/video/pd/7cb3ec8f-bca8-4a41-ba23-ace8e0d47bbe [debug] System config: [] [debug] User config: [] [debug] Custom config: [] [debug] Command-line args: ['--verbose', 'http://uvp-parlament.sf.apa.at/video/pd/7cb3ec8f-bca8-4a41-ba23-ace8e0d47bbe'] [debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8 [debug] youtube-dl version 2021.12.17 [debug] Python version 3.6.9 (CPython) - Linux-5.15.0-40-generic-x86_64-with-Ubuntu-22.04-jammy [debug] exe versions: ffmpeg 3.4.11, ffprobe 3.4.11 [debug] Proxy map: {} [generic] 7cb3ec8f-bca8-4a41-ba23-ace8e0d47bbe: Requesting header WARNING: Could not send HEAD request to http://uvp-parlament.sf.apa.at/video/pd/7cb3ec8f-bca8-4a41-ba23-ace8e0d47bbe: HTTP Error 404: Not Found [generic] 7cb3ec8f-bca8-4a41-ba23-ace8e0d47bbe: Downloading webpage ERROR: Unable to download webpage: HTTP Error 404: Not Found (caused by <HTTPError 404: 'Not Found'>); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see https://yt-dl.org/update on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output. File "/snap/youtube-dl/4750/lib/python3.6/site-packages/youtube_dl/extractor/common.py", line 634, in _request_webpage return self._downloader.urlopen(url_or_request) File "/snap/youtube-dl/4750/lib/python3.6/site-packages/youtube_dl/YoutubeDL.py", line 2298, in urlopen return self._opener.open(req, timeout=self._socket_timeout) File "/snap/youtube-dl/4750/usr/lib/python3.6/urllib/request.py", line 532, in open response = meth(req, response) File "/snap/youtube-dl/4750/usr/lib/python3.6/urllib/request.py", line 642, in http_response 'http', request, response, code, msg, hdrs) File "/snap/youtube-dl/4750/usr/lib/python3.6/urllib/request.py", line 570, in error return self._call_chain(args) File "/snap/youtube-dl/4750/usr/lib/python3.6/urllib/request.py", line 504, in _call_chain result = func(args) File "/snap/youtube-dl/4750/usr/lib/python3.6/urllib/request.py", line 650, in http_error_default raise HTTPError(req.full_url, code, msg, hdrs, fp)

Thanks for considering this request. If you need further information, please shout.

dirkf commented 2 years ago

Are you sure about the link in the log? Isn't is an expired temporary link, hence 404?

The play.shtml page is pretty unhelpful too. It looks like we should be able to use a playlist link in the page like /pls/portal/r_mediathek.p_buttons?LIVE=&P_INR=170 or /pls/portal/r_mediathek.p_live?LIVE= to get media details, but the first gives a link that goes 404 and the second is empty. Is there some geographical discrimination?

alexlist commented 2 years ago

The first one gives me

  Zu LIVE
  Teilen
  ??Download
   

The second one is empty.

I don't know if they're geoblocking or trying to avoid non-interactive clients, but happy to assist with further research.

I tried the first link via SSH forwarding from Iceland and it works. I doubt that's the problem.

If you go to https://www.parlament.gv.at/MEDIA/play.shtml?GP=XXVII&INR=170&ITYP=NRSITZ&INR_TEIL=1&DEBATTE=300, there's a download link... I'd take it from there.