Repository: yt-dlp/yt-dlp

Issue:
[Twitch] !is_live filter not excluding vod of current live in latest version
### 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 reporting that a **supported** site is broken
- [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 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 [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)
- [ ] 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

France

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

The current livestream of a twitch channel appears in the VOD tab even before the live is finished.
Previously the VOD of the current live was correctly detected as being live and was excluded by this filter : --match-filter "!is_live"

Since a few days I noticed that I downloaded partial VODs because this filter was not working anymore. VOD of the current live is not excluded by the filter.

Below is the verbose output with the latest version which is the one I use and a (as of the time of writing) link to a VOD of a stream still live. As you can see it is not excluded and starts downloading.
To reproduce : add the filter and try downloading the vod of a stream still live.

To help analyze I don't think it is a change from twitch side, because I tried downgrading to version 2023.02.17 which is the one I used before and it appears that the filter is still working in this version, VODs of current live was correctly excluded by the  "!is_live" filter.

Thank you for the work on this very helpful tool.

### 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', '--match-filter', '!is_live', '-o', '..\\Media\\Twitch\\%(uploader)s\\%(upload_date)s - %(title)s\\%(id)s.%(ext)s', 'https://www.twitch.tv/videos/1760343238']
[debug] Encodings: locale cp1252, fs utf-8, pref cp1252, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version stable@2023.03.04 [392389b7d] (win_exe)
[debug] Python 3.8.10 (CPython AMD64 64bit) - Windows-10-10.0.19045-SP0 (OpenSSL 1.1.1k  25 Mar 2021)
[debug] exe versions: ffmpeg N-109937-g05438db024-20230228 (setts), ffprobe N-109937-g05438db024-20230228
[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
Current Build Hash: 5590c57bd0433ed239a2deaaf92e2ad6f37fe50f53664c821575cafe106a9421
yt-dlp is up to date (stable@2023.03.04)
[twitch:vod] Extracting URL: https://www.twitch.tv/videos/1760343238
[twitch:vod] 1760343238: Downloading stream metadata GraphQL
[twitch:vod] 1760343238: Downloading video access token GraphQL
[twitch:vod] 1760343238: Downloading m3u8 information
[twitch:vod] 1760343238: Downloading storyboard metadata JSON
WARNING: [twitch:vod] Unable to download JSON metadata: HTTP Error 403: Forbidden
[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] v1760343238: Downloading 1 format(s): 1080p60
[debug] Invoking hlsnative downloader on "https://d2nvs31859zcd8.cloudfront.net/e61910268d0d54dad290_lcs_41940811147_1678394435/chunked/index-dvr.m3u8"
[hlsnative] Downloading m3u8 manifest
[hlsnative] Total fragments: 688
[download] Destination: ..\Media\Twitch\LCS\20230309 - 2023 LCS Spring Split - Week 7 Day 1\v1760343238.mp4
[debug] File locking is not supported. Proceeding without locking
[download]   0.6% of ~   6.08GiB at    3.72MiB/s ETA 27:41 (frag 4/688)
ERROR: Interrupted by user
```



Discussion:

Resolving patch:
diff --git a/yt_dlp/extractor/twitch.py b/yt_dlp/extractor/twitch.py
--- a/yt_dlp/extractor/twitch.py
+++ b/yt_dlp/extractor/twitch.py
@@ -456,7 +456,7 @@ def _extract_info_gql(self, info, item_id):
         thumbnail = url_or_none(info.get('previewThumbnailURL'))
         is_live = None
         if thumbnail:
-            if thumbnail.endswith('/404_processing_{width}x{height}.png'):
+            if re.findall(r'/404_processing_[^.?#]+\.png', thumbnail):
                 is_live, thumbnail = True, None
             else:
                 is_live = False


Test patch: