youtube-dl: Atresplayer broken: ERROR: Unsupported URL
-
I’ve verified and I assure that I’m running youtube-dl 2018.04.25
-
At least skimmed through the README, most notably the FAQ and BUGS sections
-
Searched the bugtracker for similar issues including closed ones
-
Checked that provided video/audio/playlist URLs (if any) are alive and playable in a browser
-
Bug report (encountered problems with youtube-dl)
[nekmo@homura /tmp]$ youtube-dl -v 'https://www.atresplayer.com/lasexta/programas/al-rojo-vivo/abril-2018/cristina-cifuentes-dimite-y-denuncia-una-campana-de-acoso-la-tolerancia-cero-contra-la-corrupcion-tiene-un-precio_5ae06d1f7ed1a84af193644b/'
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-v', 'https://www.atresplayer.com/lasexta/programas/al-rojo-vivo/abril-2018/cristina-cifuentes-dimite-y-denuncia-una-campana-de-acoso-la-tolerancia-cero-contra-la-corrupcion-tiene-un-precio_5ae06d1f7ed1a84af193644b/']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2018.04.25
[debug] Python version 3.6.3 (CPython) - Linux-4.14.5-1-ARCH-x86_64-with-arch
[debug] exe versions: ffmpeg 3.4, ffprobe 3.4, rtmpdump 2.4
[debug] Proxy map: {}
[generic] cristina-cifuentes-dimite-y-denuncia-una-campana-de-acoso-la-tolerancia-cero-contra-la-corrupcion-tiene-un-precio_5ae06d1f7ed1a84af193644b: Requesting header
WARNING: Falling back on generic information extractor.
[generic] cristina-cifuentes-dimite-y-denuncia-una-campana-de-acoso-la-tolerancia-cero-contra-la-corrupcion-tiene-un-precio_5ae06d1f7ed1a84af193644b: Downloading webpage
[generic] cristina-cifuentes-dimite-y-denuncia-una-campana-de-acoso-la-tolerancia-cero-contra-la-corrupcion-tiene-un-precio_5ae06d1f7ed1a84af193644b: Extracting information
ERROR: Unsupported URL: https://www.atresplayer.com/lasexta/programas/al-rojo-vivo/abril-2018/cristina-cifuentes-dimite-y-denuncia-una-campana-de-acoso-la-tolerancia-cero-contra-la-corrupcion-tiene-un-precio_5ae06d1f7ed1a84af193644b/
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/youtube_dl/YoutubeDL.py", line 789, in extract_info
ie_result = ie.extract(url)
File "/usr/lib/python3.6/site-packages/youtube_dl/extractor/common.py", line 440, in extract
ie_result = self._real_extract(url)
File "/usr/lib/python3.6/site-packages/youtube_dl/extractor/generic.py", line 3182, in _real_extract
raise UnsupportedError(url)
youtube_dl.utils.UnsupportedError: Unsupported URL: https://www.atresplayer.com/lasexta/programas/al-rojo-vivo/abril-2018/cristina-cifuentes-dimite-y-denuncia-una-campana-de-acoso-la-tolerancia-cero-contra-la-corrupcion-tiene-un-precio_5ae06d1f7ed1a84af193644b/
Atresplayer is supported on Youtube-Dl. Example Url:
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 1
- Comments: 67
Commits related to this issue
- [atresplayer] fix extraction(closes #16277)(closes #16716) — committed to meunierd/youtube-dl by remitamine 5 years ago
- [atresplayer] fix extraction(closes #16277)(closes #16716) — committed to pareronia/youtube-dl by remitamine 5 years ago
In case it is of help, #16278 is a duplicate of this one.
Is there any updates on this? I tried over several urls but it seems to keep giving me the ERROR: Unable to download JSON metadata: HTTP Error 404: Not Found (caused by <HTTPError 404: ‘Not Found’>)
UPDATE:
I just solved the problem I had. It is simply necessary to make a request to a url to obtain the happy cookie.
#################
I’m trying to fix the bug, but I’ve got stuck.
Indeed, as such @BlackHoleSpain says, now atresplayer forces you to authenticate with a free account to view the content.
The process to get the video urls is this:
Make a request to a url, for example: https://www.atresplayer.com/lasexta/programas/al-rojo-vivo/octubre-2019/11-10-19-raquel-ejerique-los-monjes-del-valle-de-los-caidos-reciben-340000-euros-anuales-del-estado-por-rezar-y-leer_5da06aa27ed1a8dfc5d00579/
In the source code of the page following the regular expression: r “window \ .__ PRELOADED_STATE__ = (. *?);” there is a json who has a “href” key with a url to the episode information. https://api.atresplayer.com/client/v1/page/episode/5da06aa27ed1a8dfc5d00579
Making a request to that url returns a json that has a “urlVideo” key with a url. https://api.atresplayer.com/client/v1/player/episode/5da06aa27ed1a8dfc5d00579
Make a request to this url. In the response are the links to download the episode with ffmpeg.
The problem: This last request requires to be authenticated. In particular it is necessary to make the request with the header:
Cookie: ATPSESSION=MTU3MTAwMjY0N3xB............iM9Ct6o (Large session id)
Here comes the strange thing: The login in principle seems to be a basic authorization that returns a cookie with a session id, but this cookie is not the same as we need to make the request. From what I understand, I think that just after logging in, it makes a weird non-standard oauth flow authentication by mixing oauth and session cookies that gives you the correct cookie (ATPSESSION).
So this is where I am stuck, I am not able to get ATPSESSION cookie.
I share it here. Surely we can fix this bug together.
Cito tambien a mi paisano @Nekmo
Yes. Atresplayer is still broken. Furthermore, the site has changed again on September 1st for the new 2019-2020 season, and the workaround programmed by Nekmo the last year, does NOT work any longer.
Hace 2 días hice el Pull-request, por lo que sólo queda que el equipo oficial lo verifique.
https://www.atresplayer.com/antena3/series/la-catedral-del-mar/temporada-1/capitulo-1_5b01c7e07ed1a8b40081b3e6/ tiene subtítulos (hay que elegir el 2º “español” que aparece en la selección, justo encima de “desactivar”)
@enavarrocu Gracias por la ayuda! Descargandooooo
EDITO: Lo he probado con dos vídeos y se han descargado sin problemas. Gracias de nuevo!
@jumper1985
git clone https://github.com/Nekmo/youtube-dl.git
cd youtube-dl
git checkout issue-16277
python -m youtube_dl https://www.atresplayer.com/lasexta/programas/salvados/temporada-13/esto-no-es-todo-amigos_5aed69a87ed1a8502c057efa/
Por el momento puedes ir usandolo asi hasta que sea mezclado con el repositorio original.