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

Atresplayer broken: ERROR: Unsupported URL #16277

Closed
5 tasks done
Nekmo opened this issue Apr 25, 2018 · 67 comments
Closed
5 tasks done

Atresplayer broken: ERROR: Unsupported URL #16277

Nekmo opened this issue Apr 25, 2018 · 67 comments

Comments

@Nekmo
Copy link

Nekmo commented Apr 25, 2018

  • 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:

@vitaminace33
Copy link

In case it is of help, #16278 is a duplicate of this one.

@Nekmo
Copy link
Author

Nekmo commented Apr 27, 2018

I am working to solve this issue:
https://github.com/Nekmo/youtube-dl/tree/issue-16277

I have already downloaded a video using the new API.

@Nekmo
Copy link
Author

Nekmo commented Apr 28, 2018

En principio sólo los vídeos gratuitos

@enavarrocu
Copy link

enavarrocu commented Apr 29, 2018

@Nekmo me interesa el tema. Que ha mencionado @djunknown. Puedo saber como? Gracias.

@Nekmo
Copy link
Author

Nekmo commented Apr 30, 2018

Tengo en mi repositorio una versión funcional, pero quedan los tests, soporte para subtítulos y limpiar código.

@enavarrocu
Copy link

enavarrocu commented Apr 30, 2018

UPDATE: Me he equivocado y si funciona. No estaba en el repositorio correcto.

@Nekmo Anoche probe tu branch para el fix y no me funciono. Sera porque es un video no gratis?
Probe con este link hoy y me pasa igual: https://www.atresplayer.com/antena3/series/farina/temporada-1/capitulo-8-1988_5adef2a87ed1a8f92bf5fe84/

[generic] capitulo-8-1988_5adef2a87ed1a8f92bf5fe84: Requesting header
WARNING: Falling back on generic information extractor.
[generic] capitulo-8-1988_5adef2a87ed1a8f92bf5fe84: Downloading webpage
[generic] capitulo-8-1988_5adef2a87ed1a8f92bf5fe84: Extracting information
ERROR: Unsupported URL: https://www.atresplayer.com/antena3/series/farina/temporada-1/capitulo-8-1988_5adef2a87ed1a8f92bf5fe84/

@djunknown Gracias por la informacion. Esperar a ver si lo solucionan pronto. Yo utilizaba https://www.vispo.org/kappa/ pero dejo de funcionar con la nueva API tambien.

@vitaminace33
Copy link

Hola, @Nekmo !

Con la antigua paltaforma de A3P, youtube-dl funcionaba fuera del territorio español, sin embargo issue-16277 ya no lo hace con la nueva. Imagino que la antigua plataforma tenía una geo-restricción implementada en el JS de la página, pero no así el servidor de archivos. ¿Piensas que pudiera seguir siendo así y que la geo-restricción pueda saltarse sin necesidad de VPN?

Saludos y ¡viva Málga, primah!

[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['--verbose', 'https://www.atresplayer.com/lasexta/noticias/noticias-1/abril-2018/30-04-18-las-asociaciones-judiciales-piden-la-dimision-del-ministro-catala-por-sus-criticas-a-ricardo-gonzalez-juez-del-voto-particular-de-la-manada_5ae7200b7ed1a89f40d290ea/']
[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.5 (CPython) - Linux-4.16.3-1-ARCH-x86_64-with-arch
[debug] exe versions: ffmpeg 3.4.2, ffprobe 3.4.2, phantomjs 18, rtmpdump 2.4
[debug] Proxy map: {}
[AtresPlayer] 5ae7200b7ed1a89f40d290ea: Downloading webpage
[AtresPlayer] 5ae7200b7ed1a89f40d290ea: Downloading player JSON
[AtresPlayer] 5ae7200b7ed1a89f40d290ea: Downloading video JSON
ERROR: Unable to download JSON metadata: HTTP Error 403: Forbidden (caused by <HTTPError 403: 'Forbidden'>); 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.
  File "./youtube-dl/youtube_dl/extractor/common.py", line 519, in _request_webpage
    return self._downloader.urlopen(url_or_request)
  File "./youtube-dl/youtube_dl/YoutubeDL.py", line 2203, in urlopen
    return self._opener.open(req, timeout=self._socket_timeout)
  File "/usr/lib/python3.6/urllib/request.py", line 532, in open
    response = meth(req, response)
  File "/usr/lib/python3.6/urllib/request.py", line 642, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/lib/python3.6/urllib/request.py", line 570, in error
    return self._call_chain(*args)
  File "/usr/lib/python3.6/urllib/request.py", line 504, in _call_chain
    result = func(*args)
  File "/usr/lib/python3.6/urllib/request.py", line 650, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)

@marc0s
Copy link

marc0s commented May 3, 2018

Yo también tengo problemas con los videos de las series, no encuentra la clave para descifrar el stream parece ser:

~/Projects/LocalSoftware/youtube-dl issue-16277
❯ python -m youtube_dl https://www.atresplayer.com/antena3/series/farina/temporada-1/capitulo-8-1988_5adef2a87ed1a8f92bf5fe84/
[AtresPlayer] 5adef2a87ed1a8f92bf5fe84: Downloading webpage
[AtresPlayer] 5adef2a87ed1a8f92bf5fe84: Downloading player JSON
[AtresPlayer] 5adef2a87ed1a8f92bf5fe84: Downloading video JSON
[AtresPlayer] 5adef2a87ed1a8f92bf5fe84: Downloading m3u8 information
[AtresPlayer] 5adef2a87ed1a8f92bf5fe84: Downloading MPD manifest
WARNING: Your copy of avconv is outdated and unable to properly mux separate video and audio files, youtube-dl will download single file media. Update avconv to version 10-0 or newer to fix this.
[download] Destination: Capítulo 8 - 1988-5adef2a87ed1a8f92bf5fe84.m3u8
WARNING: Your copy of avconv is outdated, update avconv to version 10-0 or newer if you encounter any errors.
ffmpeg version 3.4.2 Copyright (c) 2000-2018 the FFmpeg developers
  built with gcc 6.3.0 (Debian 6.3.0-18+deb9u1) 20170516
  configuration: --disable-decoder=amrnb --disable-decoder=libopenjpeg --disable-mips32r2 --disable-mips32r6 --disable-mips64r6 --disable-mipsdsp --disable-mipsdspr2 --disable-mipsfpu --disable-msa --disable-libopencv --disable-podpages --disable-stripping --enable-avfilter --enable-avresample --enable-gcrypt --enable-gnutls --enable-gpl --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libfdk-aac --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libilbc --enable-libkvazaar --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libx265 --enable-libxvid --enable-libzvbi --enable-nonfree --enable-opengl --enable-openssl --enable-postproc --enable-pthreads --enable-shared --enable-version3 --enable-libwebp --incdir=/usr/include/x86_64-linux-gnu --libdir=/usr/lib/x86_64-linux-gnu --prefix=/usr --toolchain=hardened --enable-frei0r --enable-chromaprint --enable-libx264 --enable-libiec61883 --enable-libdc1394 --enable-vaapi --disable-opencl --enable-libmfx --disable-altivec --shlibdir=/usr/lib/x86_64-linux-gnu
  libavutil      55. 78.100 / 55. 78.100
  libavcodec     57.107.100 / 57.107.100
  libavformat    57. 83.100 / 57. 83.100
  libavdevice    57. 10.100 / 57. 10.100
  libavfilter     6.107.100 /  6.107.100
  libavresample   3.  7.  0 /  3.  7.  0
  libswscale      4.  8.100 /  4.  8.100
  libswresample   2.  9.100 /  2.  9.100
  libpostproc    54.  7.100 / 54.  7.100
[https @ 0x55ec6a5e78a0] HTTP error 504 Gateway Time-out
https://geovod.antena3.com/vcg/_definst_/assets17/2018/04/24/B1B703C7-717E-4A56-B460-92E956A643F5/hls.smil/chunklist_b2696000_vo.m3u8?pulse=assets17%2F2018%2F04%2F24%2FB1B703C7-717E-4A56-B460-92E956A643F5%2F%7C1525369023%7Cf6368e449a78947bdb70c3da3268f958: Server returned 5XX Server Error reply


ERROR: ffmpeg exited with code 1

~/Projects/LocalSoftware/youtube-dl issue-16277 9s
❯ mpv https://geovod.antena3.com/vcg/_definst_/assets17/2018/04/24/B1B703C7-717E-4A56-B460-92E956A643F5/hls.smil/chunklist_b2696000_vo.m3u8
Playing: https://geovod.antena3.com/vcg/_definst_/assets17/2018/04/24/B1B703C7-717E-4A56-B460-92E956A643F5/hls.smil/chunklist_b2696000_vo.m3u8
[ffmpeg] tls: A TLS warning alert has been received.
[ffmpeg] Unable to open key file https://pulse.atresplayer.com/key.php
[ffmpeg/demuxer] hls,applehttp: Error when loading first segment 'https://geovod.antena3.com/vcg/_definst_/assets17/2018/04/24/B1B703C7-717E-4A56-B460-92E956A643F5/hls.smil/media_b2696000_vo_0.ts'
[lavf] avformat_open_input() failed

Playing: https://geovod.antena3.com/vcg/_definst_/assets17/2018/04/24/B1B703C7-717E-4A56-B460-92E956A643F5/hls.smil/media_b2696000_vo_0.ts
Failed to recognize file format.

Y así con todos los .ts del playlist.

¿Alguna idea?

ps: el 504 timeout fue temporal, luego funcionó, pero el error del key es el mismo.

@Nekmo
Copy link
Author

Nekmo commented May 3, 2018

En mi caso mis pruebas han sido con contenido gratuito. No es mi intención programar esto para acceder a contenido restringido. Si se puede descargar contenido de pago, será un resultado meramente casual.

Si veis problemas con contenido gratuito, comentádmelo para poder depurar los fallos :)

@vitaminace33
Copy link

No sé si consideras mi comentario más arriba como referente a contenido gratuito o no.

Saludos.

@Nekmo
Copy link
Author

Nekmo commented May 4, 2018

@djunknown no, no he dicho eso. Lee mi mensaje.

@Nekmo
Copy link
Author

Nekmo commented May 4, 2018

Lo primero, no soy andaluz, soy de Madrid. Lo segundo, tu mensaje es ofensivo para todos los andaluces. Tercero, desconozco si funciona con contenido de pago. Sí, permite descargar contenido gratuito, pero no he probado con contenido restringido sin pagar, y no es mi intención probarlo o darle soporte a propósito, porque va en contra de toda legalidad.

@Nekmo
Copy link
Author

Nekmo commented May 4, 2018

@djunknown no hay ningún cifrado en los contenidos gratuitos (al menos que yo haya podido comprobar), y desde luego no me ha hecho falta en la solución que yo he tomado.
https://github.com/Nekmo/youtube-dl/blob/6ad850fe0f487a65d771e80d3fb12d10edec2a36/youtube_dl/extractor/atresplayer.py

Ahora mismo estoy viendo un vídeo descargado sin problemas.

$ python ./bin/youtube-dl https://www.atresplayer.com/lasexta/programas/el-intermedio/temporada-12/03-05-18_5aeb3939986b28f26b825d67/
[AtresPlayer] 5aeb3939986b28f26b825d67: Downloading webpage
[AtresPlayer] 5aeb3939986b28f26b825d67: Downloading player JSON
[AtresPlayer] 5aeb3939986b28f26b825d67: Downloading video JSON
[AtresPlayer] 5aeb3939986b28f26b825d67: Downloading m3u8 information
[AtresPlayer] 5aeb3939986b28f26b825d67: Downloading MPD manifest                                                                                                                                                                                   
[dashsegments] Total fragments: 343                                                                                                                                                                                                                
[download] Destination: (03-05-18) El análisis de Zapatero sobre la disolución de ETA-5aeb3939986b28f26b825d67.fdash-p0va0br2430658.mp4                                                                                                            
[download] 100% of 991.38MiB in 03:14
[dashsegments] Total fragments: 343                                                                                                                                                                                                                
[download] Destination: (03-05-18) El análisis de Zapatero sobre la disolución de ETA-5aeb3939986b28f26b825d67.fdash-p0aa0br129343.m4a                                                                                                             
[download] 100% of 53.97MiB in 01:02
[ffmpeg] Merging formats into "(03-05-18) El análisis de Zapatero sobre la disolución de ETA-5aeb3939986b28f26b825d67.mp4"                                                                                                                         
Deleting original file (03-05-18) El análisis de Zapatero sobre la disolución de ETA-5aeb3939986b28f26b825d67.fdash-p0va0br2430658.mp4 (pass -k to keep)                                                                                           
Deleting original file (03-05-18) El análisis de Zapatero sobre la disolución de ETA-5aeb3939986b28f26b825d67.fdash-p0aa0br129343.m4a (pass -k to keep) 

Por lo que a mí respecta esta conversación ha terminado desde el mismo momento en que me has insultado tildándome de hipócrita.


Por el resto, perdonad la espera en hacer merge de los cambios. Todavía queda soportar los subtítulos, añadir los tests y refactorizar código. Espero que a partir de este fin de semana que ya no tengo trabajo, pueda continuar con esto :)

@vitaminace33
Copy link

Hola, @Nekmo: a riesgo de parecer pesado, te agradecería si pudieras hacer algún comentario sobre geo-restricción (ver más arriba). Saludos.

@Nekmo
Copy link
Author

Nekmo commented May 4, 2018

@vitaminace33 perdona que no lo haya podido probar hasta ahora. He hecho una prueba rápida, y al menos usando Tor parece haber problemas.

$ proxychains python ./bin/youtube-dl https://www.atresplayer.com/lasexta/programas/el-intermedio/temporada-12/03-05-18_5aeb3939986b28f26b825d67/
[proxychains] config file found: /etc/proxychains.conf
[proxychains] preloading /usr/lib/libproxychains4.so
[AtresPlayer] 5aeb3939986b28f26b825d67: Downloading webpage
[AtresPlayer] 5aeb3939986b28f26b825d67: Downloading player JSON
[AtresPlayer] 5aeb3939986b28f26b825d67: Downloading video JSON
ERROR: Unable to download JSON metadata: HTTP Error 403: Forbidden (caused by <HTTPError 403: 'Forbidden'>); 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.

No sé si habrá alguna solución para este problema sin utilizar un proxy. El bloqueo parece realizarse a nivel de servidor al descargar la información del vídeo. Tal vez tras obtenerse el json con la información de descarga, pueda descargarse el vídeo desde el CDN.

@vitaminace33
Copy link

Sí, desde fuera de España da problemas.

Con la plataforma/API antigua, youtube-dl funcionaba sin problemas (llevo años viviendo en el extranjero). Yo pensaba que la geo-restricción estaba en el JS u otra capa de la página y no en el servidor de medios, pero ahora que mencionas al CDN, quizá antes youtube-dl se descargaba el contenido del CDN, aunque eso lo sabrás tú mejor que yo.

Espero que puedas investigarlo. Yo puedo hacer pruebas desde fuera y dentro.

Gracias por contestar.

@Nekmo
Copy link
Author

Nekmo commented May 4, 2018

@vitaminace33 antes de descargar del CDN, descarga un json con las urls de los medios. Es ese paso en el que parece que está fallando, pero tal vez después funcione sin problemas.

@enavarrocu
Copy link

enavarrocu commented May 5, 2018

Con este https://www.atresplayer.com/antena3/series/cuerpo-de-elite/temporada-1/capitulo-1-captulo-sobrino-rey_5ad508cd7ed1a84c84438ca2/, logueado en la cuenta pero sin ser premium puedo ver el video en el navegador, pero no puedo descargarlo con youtube_dl. Estoy especificadon el usuario y la contraseña en la linea de comando.

Type account password and press [Return]:
[AtresPlayer] Logging in
[AtresPlayer] 5ad508cd7ed1a84c84438ca2: Downloading webpage
[AtresPlayer] 5ad508cd7ed1a84c84438ca2: Downloading player JSON
[AtresPlayer] 5ad508cd7ed1a84c84438ca2: Downloading video JSON
ERROR: Unable to download JSON metadata: HTTP Error 403: Forbidden (caused by HTTPError()); 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.

@vitaminace33
Copy link

Este es un problema que notifiqué hace años (no encuentro el hilo), pero que "ignoraron". En cualquier caso, no tiene que ver con este hilo. Creo que realmente deberías usar una cookie (en aquél entonces, no existía la posibilidad de uso de cookies).

@BlackHoleSpain
Copy link

El cambio en el esquema de URLs por parte de Atresmedia que ocurrió hace 13 días sigue sin solucionar.
No se arregló en el commit del 1 de Mayo ni en el posterior del 9 de Mayo (???? hoy es 8 por cierto)
¿Cuál es el problema que estáis teniendo?

@jumper1985
Copy link

Hola! Perdonad si digo alguna tontería, pero levo usando Youtube-dl bastante tiempo y nunca había tenido un problema hasta ahora con atresplayer. He actualizado a la 2018.05.09 a través de Hombrew (MacOS) y sigue sin descargarme nada

youtube-dl "https://www.atresplayer.com/antena3/series/farina/temporada-1/capitulo-10-1990_5af2cf1c7ed1a85831a8e201/"
[generic] capitulo-10-1990_5af2cf1c7ed1a85831a8e201: Requesting header
WARNING: Falling back on generic information extractor.
[generic] capitulo-10-1990_5af2cf1c7ed1a85831a8e201: Downloading webpage
[generic] capitulo-10-1990_5af2cf1c7ed1a85831a8e201: Extracting information
ERROR: Unsupported URL: https://www.atresplayer.com/antena3/series/farina/temporada-1/capitulo-10-1990_5af2cf1c7ed1a85831a8e201/

Alguien me puede echar una mano?

Gracias!!

@enavarrocu
Copy link

enavarrocu commented May 10, 2018

@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.

@jumper1985
Copy link

jumper1985 commented May 10, 2018

@enavarrocu Gracias por la ayuda! Descargandooooo

EDITO: Lo he probado con dos vídeos y se han descargado sin problemas. Gracias de nuevo!

@jEsuSdA
Copy link

jEsuSdA commented May 11, 2018

Muchas gracias por actualizar el script y solucionar el problema con la nueva versión.
Un saludo!! ;)

@BlackHoleSpain
Copy link

La página del fork de Nekmo solo tiene fuentes en Python que tal vez funcionen en Linux. Resulta que el EXE hacia el que apunta es el oficial y que sigue fallando tras 20 días. Este mismo problema (issue) abierto ni siquiera queda claro si algún responsable oficial del programa lleva el caso, porque ha habido 2 consolidaciones (commit) y en ninguna se ha arreglado el cambio de URL por parte de Atresmedia.

@pegas0
Copy link

pegas0 commented May 17, 2018

First of all: Thank you very much to Nekmo for the job.

After that [CRY MODE=ON] when will this work? (tears rolling down my face...)
I pay my subscription to atresplayer, but their web player is a nightmare (and mobile app is even worse). Youtube-dl was always my salvation... and now I wanna cry!!! :'-(

I tried enavarrocu suggestion, but it doesn't work for me, nor in linux (debian, ubuntu, or mint), nor in emulated system under android. I get HTTP Error 403: Forbidden :-((((

Help please! (and thanks again to those who can do these things for doing them and sharing with the community).

@vitaminace33
Copy link

This is because of geo-restriction. Since the renewal of ATresPlayer, you either need to connect through a VPN or be subscribed and use authentication. I haven't tried, but cookies should be the method to authenticate (-u/-p won't work).

Also, since the update, ATresplayer bandwidth sucks, it is slow as frozen, not even 360p plays properly.

@enavarrocu
Copy link

@pegas0 The 403 error is because of your location. I'm using a VPN and is working fine.

@Nekmo
Copy link
Author

Nekmo commented Jun 5, 2018

@pegas0 a mí tampoco me sale como disponible dicho capítulo de The Big Bang Theory, pero mirando otro, tampoco veo que estén disponibles los subtítulos. Habrá que seguir buscando, gracias. @vitaminace33 eso hemos estado buscando pero como dice @pegas0 no hay manera de encontrar.

@BlackHoleSpain con los vídeos que he usado yo no he tenido problemas. No obstante, ya con la versión anterior de este extractor, algunos vídeos no podían escribirse a disco porque el nombre del fichero es demasiado largo. Para solucionar esto, hay un parámetro -o. (output). Esto no es un problema del extractor sino de youtube-dl, que debería comprobar el tamaño máximo del nombre del fichero y de la ruta para el sistema de archivos destino, y acortar el nombre si es necesario. Si crees que es un problema, abre un issue al equipo de youtube-dl.

Si podéis hacer pruebas antes de que haga Pull Request os lo agradecería.

@vitaminace33
Copy link

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")

@Nekmo
Copy link
Author

Nekmo commented Jun 5, 2018

Gracias @vitaminace33 con ese ejemplo podré implementar los subtítulos.

@BlackHoleSpain
Copy link

BlackHoleSpain commented Jun 5, 2018 via email

@Nekmo
Copy link
Author

Nekmo commented Jun 5, 2018

@BlackHoleSpain no pertenezco al equipo de Youtube-dl y para hacer un Pull-request con los cambios debo seguir unas normas de estilo y cumplir unos requisitos en los que estoy trabajando.

Si se hubiese hecho ya el pull-request y se hubiese aceptado, este issue estaría ya cerrado.

@pegas0
Copy link

pegas0 commented Jun 5, 2018

@BlackHoleSpain , tanquilo compañero ;-)

@Nekmo se está pegando una currada con el código para que vuelva a funcionar... las cosas del código abierto son así, quienes saben un poquito de tal o cual cosa colaboran ese poquito en sus ratos libres, y toca esperar, echando una mano en lo que se pueda. Hay que dar las gracias a quienes dedican el poco o mucho tiempo que tienen libre para que la comunidad entera se pueda beneficiar.

Paciencia y agradecimiento ;-)
(o contratas a un programador para que desarrolle un software privativo, y te lo hace en tiempo y forma... o quizás no... jajaja)

@BlackHoleSpain
Copy link

BlackHoleSpain commented Jun 6, 2018 via email

@Nekmo
Copy link
Author

Nekmo commented Jun 6, 2018

No ha cambiado el patrón de URL. Ha cambiado todo el código. Lamento no haber podido seguir con esto antes, por causas de trabajo he estado ocupado.

@Nekmo
Copy link
Author

Nekmo commented Jun 6, 2018

The subtitles are included in the m3u8 file:

https://geovod.antena3.com/vcg/_definst_/assets4/2018/05/20/B786C467-304A-4161-8B7D-3F0E1826118C/hls.smil/playlist.m3u8?pulse=xxxx

#EXTM3U
#EXT-X-VERSION:3
#EXT-X-STREAM-INF:BANDWIDTH=5130400,CODECS="avc1.100.40,mp4a.40.2",RESOLUTION=1920x1080,AUDIO="aac",SUBTITLES="subt"
chunklist_b4664000_vo.m3u8?pulse=assets4%2F2018%2F05%2F20%2FB786C467-304A-4161-8B7D-3F0E1826118C%2F%7C1528312571%7C806a42b6175757433d9e686d63bc561b
#EXT-X-STREAM-INF:BANDWIDTH=3419900,CODECS="avc1.77.30,mp4a.40.2",RESOLUTION=1280x720,AUDIO="aac",SUBTITLES="subt"
chunklist_b3109000_vo.m3u8?pulse=assets4%2F2018%2F05%2F20%2FB786C467-304A-4161-8B7D-3F0E1826118C%2F%7C1528312571%7C806a42b6175757433d9e686d63bc561b
#EXT-X-STREAM-INF:BANDWIDTH=1710500,CODECS="avc1.77.30,mp4a.40.2",RESOLUTION=854x480,AUDIO="aac",SUBTITLES="subt"
chunklist_b1555000_vo.m3u8?pulse=assets4%2F2018%2F05%2F20%2FB786C467-304A-4161-8B7D-3F0E1826118C%2F%7C1528312571%7C806a42b6175757433d9e686d63bc561b
#EXT-X-STREAM-INF:BANDWIDTH=935000,CODECS="avc1.77.30,mp4a.40.2",RESOLUTION=640x360,AUDIO="aac",SUBTITLES="subt"
chunklist_b850000_vo.m3u8?pulse=assets4%2F2018%2F05%2F20%2FB786C467-304A-4161-8B7D-3F0E1826118C%2F%7C1528312571%7C806a42b6175757433d9e686d63bc561b
#EXT-X-STREAM-INF:BANDWIDTH=660000,CODECS="avc1.77.30,mp4a.40.2",RESOLUTION=426x240,AUDIO="aac",SUBTITLES="subt"
chunklist_b600000_vo.m3u8?pulse=assets4%2F2018%2F05%2F20%2FB786C467-304A-4161-8B7D-3F0E1826118C%2F%7C1528312571%7C806a42b6175757433d9e686d63bc561b
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="aac",LANGUAGE="es",NAME="Spanish",DEFAULT=YES,URI="chunklist_b128000_ao_sles_t64U3BhbmlzaA==.m3u8?pulse=assets4%2F2018%2F05%2F20%2FB786C467-304A-4161-8B7D-3F0E1826118C%2F%7C1528312571%7C806a42b6175757433d9e686d63bc561b"
#EXT-X-MEDIA:TYPE=SUBTITLES,GROUP-ID="subt",LANGUAGE="es",NAME="Spanish",DEFAULT=YES,URI="../vtt/es_subt.vtt"

https://geovod.antena3.com/vcg/_definst_/assets4/2018/05/20/B786C467-304A-4161-8B7D-3F0E1826118C/vtt/es_subt.vtt

#EXTM3U
#EXT-X-TARGETDURATION:1800
#EXT-X-VERSION:3
#EXT-X-MEDIA-SEQUENCE:0
#EXT-X-PLAYLIST-TYPE:VOD
#EXTINF:1800.00000,
0.vtt
#EXTINF:1800.00000,
1.vtt
#EXTINF:1800.00000,
2.vtt
#EXT-X-ENDLIST

https://geovod.antena3.com/vcg/_definst_/assets4/2018/05/20/B786C467-304A-4161-8B7D-3F0E1826118C/vtt/0.vtt

WEBVTT

00:00:00.000 --> 00:00:02.000 

00:00:10.760 --> 00:00:12.400 
"En el siglo XIV,

00:00:12.440 --> 00:00:15.600 
los campesinos vivían sujetos
a los señores feudales

00:00:15.640 --> 00:00:18.360 
sin que ninguna ley los amparara.

00:00:18.400 --> 00:00:21.520 
Su dignidad
era constantemente pisoteada

00:00:21.560 --> 00:00:23.960 
y solo podían alcanzar la libertad

....

@Nekmo
Copy link
Author

Nekmo commented Jun 6, 2018

Youtube-dl does not support subtitles on m3u8 MANIFEST #6106 . Subtitles can not work without this functionality.

@Nekmo Nekmo mentioned this issue Jun 12, 2018
5 tasks
@Nekmo
Copy link
Author

Nekmo commented Jun 14, 2018

Hace 2 días hice el Pull-request, por lo que sólo queda que el equipo oficial lo verifique.

@vitaminace33
Copy link

Por ahora, a mí todo me ha funcionado perfectamente.
Gran trabajo, @Nekmo y gracias por tu dedicación.

@shalance
Copy link

Mil gracias @Nekmo, tienes unas birras pagadas en salamanca cuando quieras! ;)

@Nekmo
Copy link
Author

Nekmo commented Jun 29, 2018

Gracias, aunque hace poco el creador de youtube-dl me ha comentado los cambios requeridos para el PR, y todavía no he tenido tiempo de mirarlo :( El miércoles espero tener un hueco para mirarlo.

@BlackHoleSpain
Copy link

BlackHoleSpain commented Jul 9, 2018 via email

@bdovaz
Copy link

bdovaz commented Dec 1, 2018

Alguna novedad?

@Nekmo
Copy link
Author

Nekmo commented Dec 1, 2018

El pull request sigue parado. He solicitado información adicional sobre algunas peticiones realizadas pero no parece haber movimiento. Es probable que no se encuentren demasiado interesados en el PR al ser un plugin para una plataforma que está sólo disponible en España.

#16716

@bdovaz
Copy link

bdovaz commented May 19, 2019

Alguna novedad?

@joeynotjoe
Copy link

Is this site still broken?

@BlackHoleSpain
Copy link

BlackHoleSpain commented Sep 23, 2019

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.

@vitaminace33
Copy link

The site is not "broken". What's broken is the support of atresplayer in the current version of ytdl. The patch by @Nekmo still works.

@BlackHoleSpain
Copy link

BlackHoleSpain commented Sep 26, 2019

Well, obviously atresplayer site is not broken, if we're all discussing here, is about its support in ytdl.
vitaminace: I don't know if you're in Spain, but I'm sorry to inform you that Nekmo's patch only works with a few of A3 own productions (El Secreto de Puente Viejo, Amar es para siempre ...) but you may know that since September 1st most of atresplayer links ask for a free account, not verified in Nekmo patch. Some logs below:

Z:\SERIES>a3ytdl.exe https://www.atresplayer.com/antena3/series/pequenas-coincidencias/temporada-1/capitulo-7-asuntos-pendientes_5d4aa2c57ed1a88fc715a615/
[AtresPlayer] 5d4aa2c57ed1a88fc715a615: Downloading player JSON
[AtresPlayer] 5d4aa2c57ed1a88fc715a615: Downloading video JSON
Traceback (most recent call last):
File "main.py", line 19, in
File "youtube_dl_init_.pyo", line 472, in main
File "youtube_dl_init_.pyo", line 462, in _real_main
File "youtube_dl\YoutubeDL.pyo", line 2001, in download
File "youtube_dl\YoutubeDL.pyo", line 792, in extract_info
File "youtube_dl\extractor\common.pyo", line 500, in extract
File "youtube_dl\extractor\atresplayer.pyo", line 113, in _real_extract
AttributeError: 'HTTPError' object has no attribute 'file'

Z:\SERIES>x:a3ytdl.exe https://www.atresplayer.com/antena3/series/pequenas-coincidencias/temporada-1/capitulo-7-asuntos-pendientes_5d4aa2c57ed1a88fc715a615/ -u mylogin -p mypwd
[AtresPlayer] get login page
Traceback (most recent call last):
File "main.py", line 19, in
File "youtube_dl_init_.pyo", line 472, in main
File "youtube_dl_init_.pyo", line 462, in _real_main
File "youtube_dl\YoutubeDL.pyo", line 2001, in download
File "youtube_dl\YoutubeDL.pyo", line 792, in extract_info
File "youtube_dl\extractor\common.pyo", line 499, in extract
File "youtube_dl\extractor\common.pyo", line 403, in initialize
File "youtube_dl\extractor\atresplayer.pyo", line 47, in _real_initialize
File "youtube_dl\extractor\atresplayer.pyo", line 64, in _login
File "youtube_dl\utils.pyo", line 560, in sanitized_Request
TypeError: init() got an unexpected keyword argument 'method'

Until July I could workaround these problems by login in the site using Chrome, saving a cookie file and importing in ytdl using --cookies option, but it's ignored by current Atresplayer site. As far as I know, Nekmo's branch hasn't been updated in a year.

@ghost
Copy link

ghost commented Oct 13, 2019

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:

  1. 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/

  2. 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

  3. 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

  4. Make a request to this url. In the response are the links to download the episode with ffmpeg.

    "sources": [
        {
            "src": "https://nogeovod-fy.atresmedia.com/vsg/_definst_/assets9/2019/10/11/699D3510-B86D-4704-821D-6A05F1559514/es.smil/playlist.m3u8?pulse=assets9%2F2019%2F10%2F11%2F699D3510-B86D-4704-821D-6A05F1559514%2F%7C1571022000%7C923223c967ef5b75b27b9366e7c57509 ",
            "type": "application/vnd.apple.mpegurl"
        },
        {
            "src": "https://voddash-fy.atresmedia.com/vsgdash/_definst_/assets9/2019/10/11/699D3510-B86D-4704-821D-6A05F1559514/en.smil/manifest_mvlist.mpd",
            "type": "application/dash+xml"
        }
    ],

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

@ghost
Copy link

ghost commented Oct 16, 2019

I can already get the "ATPSESSION" cookie.
It's needed a free account to view the content.

A POST request to https://account.atresmedia.com/api/login with username and password returns a session cookie named "SESSION". But to get the cookie named "ATPSESSION" it's needed another GET request to https://api.atresplayer.com/login with the "SESSION" cookie in header. This last request generate a OAuth flow (authorize, callback, more stuff) and returns the "ATPSESSION" cookie.

So this is a light implementation to get the links:

import requests
import re
import json

session = requests.session()

payload = {"username": "your_user", "password": "your_password"}
login_url = "https://account.atresmedia.com/api/login"
session.post(login_url, payload)

redirect_url = "https://api.atresplayer.com/login"
session.get(redirect_url)

vod_url = "https://www.atresplayer.com/lasexta/programas/al-rojo-vivo/octubre-2019/15-10-19-grande-marlaska-los-mossos-actuaron-con-proporcionalidad-para-que-los-ciudadanos-ejercieran-su-derecho-a-la-movilidad_5da5b3fe7ed1a8dfd87d1822/"
vod_data = session.get(vod_url).text

regex = r"window\.__PRELOADED_STATE__ = (.*?);"
matches = re.finditer(regex, vod_data, re.MULTILINE)
vod_text = [match for match in matches][0].groups()[0]
vod_info = json.loads(vod_text)
vod_info = [value for k, value in vod_info["links"].items()][0]

id_vod_url = vod_info["href"]
id_vod_info = session.get(id_vod_url).json()

video_url = id_vod_info["urlVideo"]
video_info = session.get(video_url).json()
print(json.dumps(video_info["sources"], indent=4))

With requests package i can use session that manage all the cookies stuff. I have tried to implement the above in the atresplayer plugin but I still don't have enough knowledge to deal with the custom request methods of the InfoExtractor class. Especially the part of the oauth flow.

@luisignaciomenendez
Copy link

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'>)

@felisucoibi
Copy link

seems there is a new api

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests