Repository: yt-dlp/yt-dlp

Issue:
[Epoch] some URLS don't work
### 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.10.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 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

world

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

**Most** URLs work fine with this extractor, but for some reason, this one doesn't.

https://www.theepochtimes.com/dick-morris-discusses-his-book-the-return-trumps-big-2024-comeback_4819205.html

The source points to https://vs.youmaker.com/assets/player/9489f994-2a20-4812-b233-ac0e5c345632 which contains the link to the .m3u8 file (yt-dlp can download the video using the URL for the .m3u8 file), but for some reason yt-dlp can't find the URL for the .m3u8 file given the URL of the video.

### 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
$ yt-dlp -v 'https://www.theepochtimes.com/dick-morris-discusses-his-book-the-return-trumps-big-2024-comeback_4819205.html'
[debug] Command-line config: ['--restrict-filenames', '-o', '%(title)s-%(id)s-%(uploader)s.%(ext)s', '-w', '-v', 'https://www.theepochtimes.com/dick-morris-discusses-his-book-the-return-trumps-big-2024-comeback_4819205.html']
[debug] Encodings: locale UTF-8, fs utf-8, pref UTF-8, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version 2022.10.04 [4e0511f] (pip) API
[debug] Python 3.9.15 (CPython 64bit) - Linux-5.15.69-with-glibc2.35 (glibc 2.35)
[debug] Checking exe version: ffmpeg -bsfs
[debug] Checking exe version: ffprobe -bsfs
[debug] exe versions: ffmpeg 4.4.2 (setts), ffprobe 4.4.2
[debug] Optional libraries: Crypto-3.15.0, certifi-3021.03.16
[debug] Proxy map: {}
[debug] Loaded 1690 extractors
[debug] [Epoch] Extracting URL: https://www.theepochtimes.com/dick-morris-discusses-his-book-the-return-trumps-big-2024-comeback_4819205.html
[Epoch] 4819205: Downloading webpage
ERROR: [Epoch] 4819205: Unable to extract url; please report this issue on  https://github.com/yt-dlp/yt-dlp/issues?q= , filling out the appropriate issue template. Confirm you are on the latest version using  yt-dlp -U
  File "/usr/lib/python3.9/site-packages/yt_dlp/extractor/common.py", line 672, in extract
    ie_result = self._real_extract(url)
  File "/usr/lib/python3.9/site-packages/yt_dlp/extractor/epoch.py", line 37, in _real_extract
    youmaker_video_id = self._search_regex(r'data-trailer="[\w-]+" data-id="([\w-]+)"', webpage, 'url')
  File "/usr/lib/python3.9/site-packages/yt_dlp/extractor/common.py", line 1224, in _search_regex
    raise RegexNotFoundError('Unable to extract %s' % _name)
```



Discussion:

Resolving patch:
diff --git a/yt_dlp/extractor/epoch.py b/yt_dlp/extractor/epoch.py
--- a/yt_dlp/extractor/epoch.py
+++ b/yt_dlp/extractor/epoch.py
@@ -1,4 +1,5 @@
 from .common import InfoExtractor
+from ..utils import extract_attributes, get_element_html_by_id
 
 
 class EpochIE(InfoExtractor):
@@ -28,13 +29,21 @@ class EpochIE(InfoExtractor):
                 'title': 'Kash Patel: A ‘6-Year-Saga’ of Government Corruption, From Russiagate to Mar-a-Lago',
             }
         },
+        {
+            'url': 'https://www.theepochtimes.com/dick-morris-discusses-his-book-the-return-trumps-big-2024-comeback_4819205.html',
+            'info_dict': {
+                'id': '9489f994-2a20-4812-b233-ac0e5c345632',
+                'ext': 'mp4',
+                'title': 'Dick Morris Discusses His Book ‘The Return: Trump’s Big 2024 Comeback’',
+            }
+        },
     ]
 
     def _real_extract(self, url):
         video_id = self._match_id(url)
         webpage = self._download_webpage(url, video_id)
 
-        youmaker_video_id = self._search_regex(r'data-trailer="[\w-]+" data-id="([\w-]+)"', webpage, 'url')
+        youmaker_video_id = extract_attributes(get_element_html_by_id('videobox', webpage))['data-id']
         formats, subtitles = self._extract_m3u8_formats_and_subtitles(
             f'http://vs1.youmaker.com/assets/{youmaker_video_id}/playlist.m3u8', video_id, 'mp4', m3u8_id='hls')
 
diff --git a/yt_dlp/utils.py b/yt_dlp/utils.py
--- a/yt_dlp/utils.py
+++ b/yt_dlp/utils.py
@@ -519,6 +519,7 @@ def __init__(self):
 
     def handle_starttag(self, tag, attrs):
         self.attrs = dict(attrs)
+        raise compat_HTMLParseError('done')
 
 
 class HTMLListAttrsParser(html.parser.HTMLParser):


Test patch: