Repository: yt-dlp/yt-dlp

Issue:
Abema tv download filename
### DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE

- [X] I understand that I will be **blocked** if I *intentionally* remove or skip any mandatory\* field

### Checklist

- [X] I'm requesting a site-specific feature
- [X] I've verified that I'm running yt-dlp version **2023.03.04** ([update instructions](https://github.com/yt-dlp/yt-dlp#update)) or later (specify commit)
- [X] I've checked that all provided URLs are playable in a browser with the same IP and same login details
- [X] I've searched [known issues](https://github.com/yt-dlp/yt-dlp/issues/3766) and the [bugtracker](https://github.com/yt-dlp/yt-dlp/issues?q=) for similar issues **including closed ones**. DO NOT post duplicates
- [X] I've read the [guidelines for opening an issue](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#opening-an-issue)
- [X] I've read about [sharing account credentials](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#are-you-willing-to-share-account-details-if-needed) and I'm willing to share it if required

### Region

japan

### Example URLs

https://abema.tv/video/episode/90-1451_s1_p122

### Provide a description that is worded well enough to be understood

.../0/Movies $ yt-dlp -U
Available version: stable@2023.03.04, Current version: stable@2023.03.04
yt-dlp is up to date (stable@2023.03.04)
.../0/Movies $ yt-dlp -N 6 https://abema.tv/video/episode/90-1451_s1_p122
[AbemaTV] Extracting URL: https://abema.tv/video/episode/90-1451_s1_p122
[AbemaTV] Authorizing
[AbemaTV] 90-1451_s1_p122: Downloading webpage
[AbemaTV] 90-1451_s1_p122: Checking playability
[AbemaTV] 90-1451_s1_p122: Downloading m3u8 information
WARNING: Extractor failed to obtain "title". Creating a generic title instead
[info] 90-1451_s1_p122: Downloading 1 format(s): 5300
[hlsnative] Downloading m3u8 manifest
[hlsnative] Total fragments: 393
[download] Destination: AbemaTV video #90-1451_s1_p122 [90-1451_s1_p122].mp4

Currently, when receiving from abema, It's saved under this file name "AbemaTV video #90-1451_s1_p122 [90-1451_s1_p122].mp4" 
I want to take it under this file name "ヒロミ・指原の“恋のお世 話始めました” - ＃119：巨乳と貧乳どっちが好き？笑常ラ殺悩ルド゙かお連♡.mp4
 "Program title + Episode title". I hope it's saved in that format

I'm sorry if it could be weird using a translator

### Provide verbose output that clearly demonstrates the problem

- [X] Run **your** yt-dlp command with **-vU** flag added (`yt-dlp -vU <your command line>`)
- [ ] If using API, add `'verbose': True` to `YoutubeDL` params instead
- [X] Copy the WHOLE output (starting with `[debug] Command-line config`) and insert it below

### Complete Verbose Output

```shell
[debug] Command-line config: ['-vU', 'https://abema.tv/video/episode/90-1451_s1_p122']
[debug] Encodings: locale utf-8, fs utf-8, pref utf-8, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version stable@2023.03.04 [392389b7d] (pip)
[debug] Python 3.11.2 (CPython aarch64 64bit) - Linux-4.14.113-25747436-aarch64-with-libc (OpenSSL 3.0.8 7 Feb 2023, libc)
[debug] exe versions: ffmpeg 6.0 (setts), ffprobe 6.0
[debug] Optional libraries: Cryptodome-3.17, brotli-1.0.9, certifi-2022.12.07, mutagen-1.46.0, sqlite3-2.6.0, websockets-10.4
[debug] Proxy map: {}
[debug] Loaded 1786 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest
Available version: stable@2023.03.04, Current version: stable@2023.03.04
yt-dlp is up to date (stable@2023.03.04)
[AbemaTV] Extracting URL: https://abema.tv/video/episode/90-1451_s1_p122
[AbemaTV] Authorizing
[AbemaTV] 90-1451_s1_p122: Downloading webpage
[AbemaTV] 90-1451_s1_p122: Checking playability
[AbemaTV] 90-1451_s1_p122: Downloading m3u8 information
WARNING: Extractor failed to obtain "title". Creating a generic title instead
[debug] Formats sorted by: hasvid, ie_pref, lang, quality, res, fps, hdr:12(7), vcodec:vp9.2(10), channels, acodec, filesize, fs_approx, tbr, vbr, abr, asr, proto, vext, aext, hasaud, source, id
[debug] Default format spec: bestvideo*+bestaudio/best
[info] 90-1451_s1_p122: Downloading 1 format(s): 5300
[debug] Invoking hlsnative downloader on "https://vod-abematv.akamaized.net/program/90-1451_s1_p122/1080/playlist.m3u8?aver=1"
[hlsnative] Downloading m3u8 manifest
[hlsnative] Total fragments: 393
[download] Destination: AbemaTV video #90-1451_s1_p122 [90-1451_s1_p122].mp4
```



Discussion:
```
$ ./yt-dlp.sh -v -O title https://abema.tv/video/episode/90-1451_s1_p122
[debug] Command-line config: ['-v', '-O', 'title', 'https://abema.tv/video/episode/90-1451_s1_p122']
[debug] Encodings: locale UTF-8, fs utf-8, pref UTF-8, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version stable@2023.03.04 [392389b7d] (source)
[debug] Lazy loading extractors is disabled
[debug] Git HEAD: ab92d8651
[debug] Python 3.10.6 (CPython x86_64 64bit) - Linux-5.15.0-60-generic-x86_64-with-glibc2.35 (OpenSSL 3.0.2 15 Mar 2022, glibc 2.35)
[debug] exe versions: ffmpeg 4.4.2 (setts), ffprobe 4.4.2
[debug] Optional libraries: mutagen-1.45.1, pycrypto-3.10.1, sqlite3-2.6.0, websockets-10.1
[debug] Proxy map: {}
[debug] Loaded 1793 extractors
[AbemaTV] Extracting URL: https://abema.tv/video/episode/90-1451_s1_p122
[AbemaTV] Authorizing
[AbemaTV] 90-1451_s1_p122: Downloading webpage
[AbemaTV] 90-1451_s1_p122: Checking playability
WARNING: [AbemaTV] This is a premium-only stream
[AbemaTV] 90-1451_s1_p122: Downloading m3u8 information
[debug] Formats sorted by: hasvid, ie_pref, lang, quality, res, fps, hdr:12(7), vcodec:vp9.2(10), channels, acodec, filesize, fs_approx, tbr, vbr, abr, asr, proto, vext, aext, hasaud, source, id
[debug] Default format spec: bestvideo*+bestaudio/best
[info] 90-1451_s1_p122: Downloading 1 format(s): 5300
＃119：巨乳と貧乳どっちが好き？お笑い常連グラドルが悩殺♡
```
Cannot reproduce locally. Run yt-dlp with `--write-page` and send me .dump files
You can either send here, via email ( nao20010128@gmail.com ), or via Discord ([join yt-dlp's server](https://discord.gg/H5MNcFW63r) and ping `Lesmiscꙮre`)

Resolving patch:
diff --git a/yt_dlp/extractor/abematv.py b/yt_dlp/extractor/abematv.py
--- a/yt_dlp/extractor/abematv.py
+++ b/yt_dlp/extractor/abematv.py
@@ -436,6 +436,16 @@ def _real_extract(self, url):
             if 3 not in ondemand_types:
                 # cannot acquire decryption key for these streams
                 self.report_warning('This is a premium-only stream')
+            info.update(traverse_obj(api_response, {
+                'series': ('series', 'title'),
+                'season': ('season', 'title'),
+                'season_number': ('season', 'sequence'),
+                'episode_number': ('episode', 'number'),
+            }))
+            if not title:
+                title = traverse_obj(api_response, ('episode', 'title'))
+            if not description:
+                description = traverse_obj(api_response, ('episode', 'content'))
 
             m3u8_url = f'https://vod-abematv.akamaized.net/program/{video_id}/playlist.m3u8'
         elif video_type == 'slots':


Test patch: