Repository: yt-dlp/yt-dlp

Issue:
swearnet extractor fails to download some episodes
### DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE

- [X] I understand that I will be **blocked** if I remove or skip any mandatory\* field

### Checklist

- [X] I'm reporting a broken site
- [X] I've verified that I'm running yt-dlp version **2022.11.11** ([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 checked that all URLs and arguments with special characters are [properly quoted or escaped](https://github.com/yt-dlp/yt-dlp/wiki/FAQ#video-url-contains-an-ampersand--and-im-getting-some-strange-output-1-2839-or-v-is-not-recognized-as-an-internal-or-external-command)
- [X] I've searched 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)
- [ ] 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

Canada, USA, probably worldwide as well but can't verify

### Provide a description that is worded well enough to be understood

Some episodes of some shows fail to start to download from site swearnet.com. (Example error output with full with -vU in the appropriate section below):

In the case of TNT Fubar, every episode works with no errors except 4 and 8. Interestingly, half the successful episodes have a different file naming convention, but I do not know if this is related. Example:

`TNT FUBAR Episode 1： Pork 'n Hash [30598437].mp4`
`Episode 5 - Cutlass Supreme [31234556].mp4`

### Provide verbose output that clearly demonstrates the problem

- [X] Run **your** yt-dlp command with **-vU** flag added (`yt-dlp -vU <your command line>`)
- [X] Copy the WHOLE output (starting with `[debug] Command-line config`) and insert it below

### Complete Verbose Output

```shell
[debug] Command-line config: ['-vU', '--cookies', 'cookies.txt', 'https://www.swearnet.com/shows/tnt-fubar/seasons/1/episodes/4']
[debug] Encodings: locale cp1252, fs utf-8, pref cp1252, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version 2022.11.11 [8b64402] (win_exe)
[debug] Python 3.8.10 (CPython AMD64 64bit) - Windows-10-10.0.19044-SP0 (OpenSSL 1.1.1k  25 Mar 2021)
[debug] exe versions: ffmpeg N-109165-g9f5a9a7499-20221122 (setts), ffprobe N-109165-g9f5a9a7499-20221122
[debug] Optional libraries: Cryptodome-3.15.0, brotli-1.0.9, certifi-2022.09.24, mutagen-1.46.0, sqlite3-2.6.0, websockets-10.4
[debug] Proxy map: {}
[debug] Loaded 1723 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest
Latest version: 2022.11.11, Current version: 2022.11.11
yt-dlp is up to date (2022.11.11)
[debug] [SwearnetEpisode] Extracting URL: https://www.swearnet.com/shows/tnt-fubar/seasons/1/episodes/4
[SwearnetEpisode] tnt-fubar: Downloading webpage
[SwearnetEpisode] tnt-fubar: Downloading JSON metadata
[SwearnetEpisode] tnt-fubar: Downloading m3u8 information
[SwearnetEpisode] tnt-fubar: Downloading m3u8 information
[SwearnetEpisode] tnt-fubar: Downloading m3u8 information
[SwearnetEpisode] tnt-fubar: Downloading m3u8 information
[SwearnetEpisode] tnt-fubar: Downloading m3u8 information
ERROR: _html_search_meta() missing 1 required positional argument: 'html'
Traceback (most recent call last):
  File "yt_dlp\YoutubeDL.py", line 1485, in wrapper
  File "yt_dlp\YoutubeDL.py", line 1561, in __extract_info
  File "yt_dlp\extractor\common.py", line 674, in extract
  File "yt_dlp\extractor\swearnet.py", line 65, in _real_extract
TypeError: _html_search_meta() missing 1 required positional argument: 'html'
```



Discussion:
This should fix it, but I don't have an account to test:
```diff
diff --git a/yt_dlp/extractor/swearnet.py b/yt_dlp/extractor/swearnet.py
index 86a303ec7..6e216a2a5 100644
--- a/yt_dlp/extractor/swearnet.py
+++ b/yt_dlp/extractor/swearnet.py
@@ -62,7 +62,7 @@ def _real_extract(self, url):
             'id': str(json_data['videoId']),
             'title': json_data.get('name') or self._html_search_meta(['og:title', 'twitter:title'], webpage),
             'description': (json_data.get('description')
-                            or self._html_search_meta(['og:description', 'twitter:description'])),
+                            or self._html_search_meta(['og:description', 'twitter:description'], webpage)),
             'duration': int_or_none(json_data.get('seconds')),
             'formats': formats,
             'subtitles': subtitles,
```
I think I did this correctly since I seem to have gotten a positive result: I downloaded the source and changed only the "self._html_search_meta" line mentioned above, then used yt-dlp.cmd to run the same command for both 4 and 8. So this fix appears to work.

debug output:
```shell
[debug] Command-line config: ['-vU', '--cookies', 'cookies.txt', 'https://www.swearnet.com/shows/tnt-fubar/seasons/1/episodes/8']
[debug] Encodings: locale cp1252, fs utf-8, pref cp1252, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version 2022.11.11 [8b644025b]
[debug] Lazy loading extractors is disabled
[debug] Plugins: ['SamplePluginIE', 'SamplePluginPP']
[debug] Python 3.10.0 (CPython AMD64 64bit) - Windows-10-10.0.19045-SP0 (OpenSSL 1.1.1l  24 Aug 2021)
[debug] exe versions: ffmpeg N-109165-g9f5a9a7499-20221122 (setts), ffprobe N-109165-g9f5a9a7499-20221122
[debug] Optional libraries: Cryptodome-3.15.0, brotli-1.0.9, certifi-2022.09.24, mutagen-1.46.0, sqlite3-2.6.0, websockets-10.4
[debug] Proxy map: {}
[debug] Loaded 1724 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest
Latest version: 2022.11.11, Current version: 2022.11.11
yt-dlp is up to date (2022.11.11)
[debug] [SwearnetEpisode] Extracting URL: https://www.swearnet.com/shows/tnt-fubar/seasons/1/episodes/8
[SwearnetEpisode] tnt-fubar: Downloading webpage
[SwearnetEpisode] tnt-fubar: Downloading JSON metadata
[SwearnetEpisode] tnt-fubar: Downloading m3u8 information
[SwearnetEpisode] tnt-fubar: Downloading m3u8 information
[SwearnetEpisode] tnt-fubar: Downloading m3u8 information
[SwearnetEpisode] tnt-fubar: Downloading m3u8 information
[SwearnetEpisode] tnt-fubar: Downloading m3u8 information
[debug] Default format spec: bestvideo*+bestaudio/best
[info] 31891886: Downloading 1 format(s): 4293-1
[debug] Invoking hlsnative downloader on "https://cdn.vidyard.com/hls/Prf5YJSx3x_LzBGJazKueQ/full_hd_segmented/full_hd_segmented_QLXnOkpu3DYaeWXNjaat-A.m3u8"
[hlsnative] Downloading m3u8 manifest
[hlsnative] Total fragments: 155
[download] Destination: Episode 8 - Bunged Up Driving Foot [31891886].mp4
[debug] File locking is not supported. Proceeding without locking
[download] 100% of  327.29MiB in 00:00:51 at 6.31MiB/s
[debug] ffprobe command line: ffprobe -hide_banner -show_format -show_streams -print_format json "file:Episode 8 - Bunged Up Driving Foot [31891886].mp4"
[FixupM3u8] Fixing MPEG-TS in MP4 container of "Episode 8 - Bunged Up Driving Foot [31891886].mp4"
[debug] ffmpeg command line: ffmpeg -y -loglevel "repeat+info" -i "file:Episode 8 - Bunged Up Driving Foot [31891886].mp4" -map 0 -dn -ignore_unknown -c copy -f mp4 "-bsf:a" aac_adtstoasc -movflags "+faststart" "file:Episode 8 - Bunged Up Driving Foot [31891886].temp.mp4"
```

Resolving patch:
diff --git a/yt_dlp/extractor/swearnet.py b/yt_dlp/extractor/swearnet.py
--- a/yt_dlp/extractor/swearnet.py
+++ b/yt_dlp/extractor/swearnet.py
@@ -62,7 +62,7 @@ def _real_extract(self, url):
             'id': str(json_data['videoId']),
             'title': json_data.get('name') or self._html_search_meta(['og:title', 'twitter:title'], webpage),
             'description': (json_data.get('description')
-                            or self._html_search_meta(['og:description', 'twitter:description'])),
+                            or self._html_search_meta(['og:description', 'twitter:description'], webpage)),
             'duration': int_or_none(json_data.get('seconds')),
             'formats': formats,
             'subtitles': subtitles,


Test patch: