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
132.28k stars 10.03k forks source link

TF1 broken again #6678

Closed Cigaes closed 8 years ago

Cigaes commented 9 years ago

The following URL on TF1 replay does not work: http://www.tf1.fr/tf1/mentalist/videos/replay-mentalist-episode-1-saison-07-de-nuages-a-l-horizon.html

With the following quick-and-dirty patch:

diff --git a/youtube_dl/extractor/tf1.py b/youtube_dl/extractor/tf1.py
index 3a68eaa..35899dc 100644
--- a/youtube_dl/extractor/tf1.py
+++ b/youtube_dl/extractor/tf1.py
@@ -6,7 +6,7 @@ from .common import InfoExtractor

 class TF1IE(InfoExtractor):
     """TF1 uses the wat.tv player."""
-    _VALID_URL = r'http://(?:(?:videos|www|lci)\.tf1|www\.tfou)\.fr/.*?-(?P<id>\d+)(?:-\d+)?\.html'
+    _VALID_URL = r'http://(?:(?:videos|www|lci)\.tf1|www\.tfou)\.fr/.*?(?:-(?P<id>\d+)(?:-\d+)?)?\.html'
     _TESTS = [{
         'url': 'http://videos.tf1.fr/auto-moto/citroen-grand-c4-picasso-2013-presentation-officielle-8062060.html',
         'info_dict': {
diff --git a/youtube_dl/extractor/wat.py b/youtube_dl/extractor/wat.py
index affcc52..cf4003b 100644
--- a/youtube_dl/extractor/wat.py
+++ b/youtube_dl/extractor/wat.py
@@ -12,7 +12,7 @@ from ..utils import (

 class WatIE(InfoExtractor):
-    _VALID_URL = r'http://www\.wat\.tv/video/(?P<display_id>.*)-(?P<short_id>.*?)_.*?\.html'
+    _VALID_URL = r'http://(?:www\.wat\.tv|wat\.replay\.tf1\.fr)/video/(?P<display_id>.*)-(?P<short_id>.*?)_.*?\.html'
     IE_NAME = 'wat.tv'
     _TESTS = [
         {

… I can get further, but it stops with:

[TF1] None: Downloading webpage
[TF1] Downloading embed player page
[TF1] Downloading JSON metadata
[wat.tv] replay-mentalist-episode-saison: Downloading webpage
[wat.tv] 12724203: Downloading JSON metadata
[wat.tv] 12724203: Downloading server time
[wat.tv] 12724203: Downloading SD video URL
[wat.tv] 12724203: Downloading server time
[wat.tv] 12724203: Downloading HD video URL
[f4m] Downloading f4m manifest
ERROR: unable to download video data: HTTP Error 403: Forbidden

Regards,

Nicolas George

yan12125 commented 9 years ago

I got the following error in browsers:

Ce contenu n'est pas disponible dans votre zone géographique

Or, "This content is not available in your area" in English.

Can you watch this video in browsers? Are you in France? I tried several France proxies with no luck.

Cigaes commented 9 years ago

I just tried again and now it gets a 404; I suppose the video stays online only a week. The second episode has the same scheme: http://www.tf1.fr/tf1/mentalist/videos/replay-mentalist-episode-2-saison-07-verrous.html

For some reason, their player thinks flash is not installed, except it is; not worrying about how to get flash working is one of my reasons for using youtube-dl so much. But I am located in France, so I should be able to access this particular video.

yan12125 commented 9 years ago

Try to make the video available in browsers. One of youtube-dl's principles is that a video will not be supported unless someone can play it on browsers/mobile phones/etc.

OlivierJeannet commented 9 years ago

I live in France (Paris) and I also have the problem, I can't download anymore from the replay TV of TF1. I had youtube-dl version 2015.08.28 and was getting 404 error. Now I upgraded to youtube-dl version 2015.09.03 , and for example this recent aired episode (today, 6 septembre 2015 17:10) doesn't work :

~/youtube-dl -F http://www.tf1.fr/tf1/experts-miami/videos/experts-miami-episode-16-saison-06-grand-nettoyage.html

[generic] experts-miami-episode-16-saison-06-grand-nettoyage: Requesting header WARNING: Falling back on generic information extractor. [generic] experts-miami-episode-16-saison-06-grand-nettoyage: Downloading webpage [generic] experts-miami-episode-16-saison-06-grand-nettoyage: Extracting information ERROR: Unsupported URL: http://www.tf1.fr/tf1/experts-miami/videos/experts-miami-episode-16-saison-06-grand-nettoyage.html

If this helps to find a solution.

Best regards to the developpers of this wonderful tool.

yan12125 commented 9 years ago

This video is geo-restricted, too :(

campones commented 9 years ago

but not in France obviously

remitamine commented 8 years ago

the f4m fragments are protected with Akamai Player Verification Token(the f4m fragment urls contain the pvtoken param). taking http://www.tf1.fr/tf1/person-of-interest/videos/person-of-interest-episode-1-saison-04-une-vie-normale.html as an example. the json data contain url to custom domain that use the same wat.tv layout(http://wat.replay.tf1.fr/video/person-of-interest-episode-7pjca_5n7c5_.html). this is a fragment url that contain the pvtoken. http://tf1vodhdscatchup-vh.akamaihd.net/z/H264-384x288/87/78/12948778.h264/0_6b2ff5ecca11e4fd_Seg1-Frag1?pvtoken=exp%3D9999999999%7Eacl%3D%252f%252a%7Edata%3DZXhwPTE0NTIzNzg0Njl+YWNsPSUyZip+ZGF0YT1wdmMsc35obWFjPWNlOTc0ZTA1NDU4ODM1ZWViMTY2YzgxY2NjZGFiZTJkOWFkYzg0MDJhYWY5YTQxZDliODRiNmJkODk2NDgwODE%3D%2147DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU%3D%7Ehmac%3DD96685FB26D558EF70B02478B1692442E6EDF6B7FE3C5194623CA3E6200E002D&hdntl=exp=1452378469~acl=%2f*~data=hdntl~hmac=4495126106eaa805be596bd51657fb469a6be89f74827ddd18ee87ab3e826ef8&bu=WAT&login=person-of-interest-tf1&i=178.32.69.217&u=d08e7f23d9526739cfca991332817762&sum=a980e017dfd196cff0e2e9312db1548d&start=0&als=0,2,0,0,0,NaN,0,0,0,26,f,0,2501.16,f,s,MFXTMUIVCRMN,2.11.3,26&hdcore=2.11.3

Animis09 commented 8 years ago

TF1 seems to be broken again:

root:~# youtube-dl -F http://www.tf1.fr/tf1/the-voice/videos/amandine-rend-dingue-mika-choisissant-florent-pagny.html --verbose [debug] System config: [] [debug] User config: [] [debug] Command-line args: [u'-F', u'http://www.tf1.fr/tf1/the-voice/videos/amandine-rend-dingue-mika-choisissant-florent-pagny.html', u'--verbose'] [debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8 [debug] youtube-dl version 2016.05.30.2 [debug] Proxy map: {} [TF1] amandine-rend-dingue-mika-choisissant-florent-pagny: Downloading webpage Traceback (most recent call last): File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main "main", fname, loader, pkg_name) File "/usr/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 File "/usr/local/bin/youtube-dl/youtube_dl/init.py", line 421, in main File "/usr/local/bin/youtube-dl/youtube_dl/init.py", line 411, in _real_main File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1736, in download File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 676, in extract_info File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 341, in extract File "/usr/local/bin/youtube-dl/youtube_dl/extractor/tf1.py", line 52, in _real_extract File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 653, in _html_search_regex File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 623, in _search_regex File "/usr/lib/python2.7/re.py", line 142, in search return _compile(pattern, flags).search(string) File "/usr/lib/python2.7/re.py", line 242, in _compile raise error, v # invalid expression sre_constants.error: nothing to repeat

yan12125 commented 8 years ago

@Animis09 Please open a new issue for that.

yan12125 commented 8 years ago

@remitamine Since c5f51551006c9d9ad7263cb3d3d90d1c91c8c648 both m3u8 and f4m formats are extracted, while all links except the last one give 404. Is the issue resolved?

remitamine commented 8 years ago

Is the issue resolved?

it should be.

yan12125 commented 8 years ago

Thanks.