Repository: ytdl-org/youtube-dl

Issue:
[Tver] Can`t download Fuji TV video 
<!--

######################################################################
  WARNING!
  IGNORING THE FOLLOWING TEMPLATE WILL RESULT IN ISSUE CLOSED AS INCOMPLETE
######################################################################

-->


## Checklist

<!--
Carefully read and work through this check list in order to prevent the most common mistakes and misuse of youtube-dl:
- First of, make sure you are using the latest version of youtube-dl. Run `youtube-dl --version` and ensure your version is 2021.04.07. If it's not, see https://yt-dl.org/update on how to update. Issues with outdated version will be REJECTED.
- Make sure that all provided video/audio/playlist URLs (if any) are alive and playable in a browser.
- Make sure that all URLs and arguments with special characters are properly quoted or escaped as explained in http://yt-dl.org/escape.
- Search the bugtracker for similar issues: http://yt-dl.org/search-issues. DO NOT post duplicates.
- Finally, put x into all relevant boxes (like this [x])
-->

- [x] I'm reporting a broken site support
- [x] I've verified that I'm running youtube-dl version **2021.04.07**
- [x] I've checked that all provided URLs are alive and playable in a browser
- [x] I've checked that all URLs and arguments with special characters are properly quoted or escaped
- [x] I've searched the bugtracker for similar issues including closed ones


## Verbose log

```
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-f', 'best', 'https://tver.jp/corner/f0072083', '-o', 'D:\\video\\download\\a.mp4', '-v']
[debug] Encodings: locale cp932, fs mbcs, out cp932, pref cp932
[debug] youtube-dl version 2021.04.07
[debug] Python version 3.4.4 (CPython) - Windows-10-10.0.19041
[debug] exe versions: ffmpeg 4.2, ffprobe 4.2
[debug] Proxy map: {}
[TVer] Downloading JSON metadata
[TVer] f0072083: Downloading JSON metadata
[FujiTVFODPlus7] 6191645753001: Downloading m3u8 information
ERROR: No video formats found; 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.
```

## Description

[TVer](tver.jp) is Japanese video site. Some TV stations are on this site posting a video.

I can no longer download videos from a TV station called Fuji TV. I think the cause is a specification change. it become the same as any other TV station. (https://tver.jp/info/notice/3137.html) 
Can you please support a new specification.
Thanks. 


Discussion:
With a modified youtube-dl, which never redirects to FujiTVFODPlus7IE, that worked. It seems Fuji has stopped using it.

```
$ python3 -m youtube_dl https://tver.jp/corner/f0072083
[TVer] Downloading JSON metadata
[TVer] f0072083: Downloading JSON metadata
[brightcove:new] ref:2613810025_20210415: Downloading JSON metadata
[brightcove:new] ref:2613810025_20210415: Downloading m3u8 information
[brightcove:new] ref:2613810025_20210415: Downloading m3u8 information
[brightcove:new] ref:2613810025_20210415: Downloading m3u8 information
[brightcove:new] ref:2613810025_20210415: Downloading m3u8 information
[brightcove:new] ref:2613810025_20210415: Downloading MPD manifest
[brightcove:new] ref:2613810025_20210415: Downloading MPD manifest
WARNING: Requested formats are incompatible for merge and will be merged into mkv.
[hlsnative] Downloading m3u8 manifest
[hlsnative] Total fragments: 264
[download] Destination: 千鳥のクセがスゴいネタGP　クセスゴシンガーたちが新曲披露！-ref -2613810025_20210415.fhls-3175-1.mp4
[download]   0.4% of ~647.61MiB at  7.93MiB/s ETA 01:43 (1 fragments of 264)^C
ERROR: Interrupted by user
```


```diff
diff --git a/youtube_dl/extractor/tver.py b/youtube_dl/extractor/tver.py
index a54f49319..cf3d2731d 100644
--- a/youtube_dl/extractor/tver.py
+++ b/youtube_dl/extractor/tver.py
@@ -51,7 +51,7 @@ class TVerIE(InfoExtractor):
             'episode_number': int_or_none(try_get(main, lambda x: x['ext']['episode_number'])),
         }
 
-        if service == 'cx':
+        if service == 'cx' and False:
             title = main['title']
             subtitle = strip_or_none(main.get('subtitle'))
             if subtitle:
```


P.S. if you know any other TVer video from ~~フジテレビ~~ FujiTV, let me know so that I can test it
Who can fix the issue and merge into master?

Resolving patch:
diff --git a/youtube_dl/extractor/tver.py b/youtube_dl/extractor/tver.py
--- a/youtube_dl/extractor/tver.py
+++ b/youtube_dl/extractor/tver.py
@@ -9,7 +9,6 @@
     int_or_none,
     remove_start,
     smuggle_url,
-    strip_or_none,
     try_get,
 )
 
@@ -45,32 +44,18 @@ def _real_extract(self, url):
             query={'token': self._TOKEN})['main']
         p_id = main['publisher_id']
         service = remove_start(main['service'], 'ts_')
-        info = {
+
+        r_id = main['reference_id']
+        if service not in ('tx', 'russia2018', 'sebare2018live', 'gorin'):
+            r_id = 'ref:' + r_id
+        bc_url = smuggle_url(
+            self.BRIGHTCOVE_URL_TEMPLATE % (p_id, r_id),
+            {'geo_countries': ['JP']})
+
+        return {
             '_type': 'url_transparent',
             'description': try_get(main, lambda x: x['note'][0]['text'], compat_str),
             'episode_number': int_or_none(try_get(main, lambda x: x['ext']['episode_number'])),
+            'url': bc_url,
+            'ie_key': 'BrightcoveNew',
         }
-
-        if service == 'cx':
-            title = main['title']
-            subtitle = strip_or_none(main.get('subtitle'))
-            if subtitle:
-                title += ' - ' + subtitle
-            info.update({
-                'title': title,
-                'url': 'https://i.fod.fujitv.co.jp/plus7/web/%s/%s.html' % (p_id[:4], p_id),
-                'ie_key': 'FujiTVFODPlus7',
-            })
-        else:
-            r_id = main['reference_id']
-            if service not in ('tx', 'russia2018', 'sebare2018live', 'gorin'):
-                r_id = 'ref:' + r_id
-            bc_url = smuggle_url(
-                self.BRIGHTCOVE_URL_TEMPLATE % (p_id, r_id),
-                {'geo_countries': ['JP']})
-            info.update({
-                'url': bc_url,
-                'ie_key': 'BrightcoveNew',
-            })
-
-        return info


Test patch: