Repository: yt-dlp/yt-dlp

Issue:
PearVideo raises "unable to extract timestamp" warning followed by a no video formats found error
### Checklist

- [X] I'm reporting a broken site
- [X] I've verified that I'm running yt-dlp version **2022.04.08** ([update instructions](https://github.com/yt-dlp/yt-dlp#update)) or later (specify commit)
- [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](https://github.com/ytdl-org/youtube-dl#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

North America

### Description

Running yt-dlp on a PearVideo URL returns an 'unable to extract timestamp' error followed by a 'No video formats found!' error.

### Verbose log

```shell
[debug] Command-line config: ['-vU', 'https://www.pearvideo.com/video_1650158']
[debug] Encodings: locale UTF-8, fs utf-8, out utf-8, err utf-8, pref UTF-8
[debug] yt-dlp version 2022.04.08 [7884ade65]
[debug] Python version 3.10.2 (CPython 64bit) - macOS-11.6-x86_64-i386-64bit
[debug] Checking exe version: ffmpeg -bsfs
[debug] Checking exe version: ffprobe -bsfs
[debug] exe versions: ffmpeg 5.0.1 (setts), ffprobe 5.0.1, phantomjs 2.1.1, rtmpdump 2.4
[debug] Optional libraries: brotli, certifi, Cryptodome, mutagen, sqlite, websockets
[debug] Proxy map: {}
Latest version: 2022.04.08, Current version: 2022.04.08
yt-dlp is up to date (2022.04.08)
[debug] [PearVideo] Extracting URL: https://www.pearvideo.com/video_1650158
[PearVideo] 1650158: Downloading webpage
WARNING: [PearVideo] unable to extract timestamp; 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
ERROR: [PearVideo] 1650158: No video formats found!; 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
Traceback (most recent call last):
  File "/usr/local/Cellar/yt-dlp/2022.4.8/libexec/lib/python3.10/site-packages/yt_dlp/YoutubeDL.py", line 1408, in wrapper
    return func(self, *args, **kwargs)
  File "/usr/local/Cellar/yt-dlp/2022.4.8/libexec/lib/python3.10/site-packages/yt_dlp/YoutubeDL.py", line 1492, in __extract_info
    return self.process_ie_result(ie_result, download, extra_info)
  File "/usr/local/Cellar/yt-dlp/2022.4.8/libexec/lib/python3.10/site-packages/yt_dlp/YoutubeDL.py", line 1548, in process_ie_result
    ie_result = self.process_video_result(ie_result, download=download)
  File "/usr/local/Cellar/yt-dlp/2022.4.8/libexec/lib/python3.10/site-packages/yt_dlp/YoutubeDL.py", line 2487, in process_video_result
    self.raise_no_formats(info_dict)
  File "/usr/local/Cellar/yt-dlp/2022.4.8/libexec/lib/python3.10/site-packages/yt_dlp/YoutubeDL.py", line 981, in raise_no_formats
    raise ExtractorError(msg, video_id=info['id'], ie=info['extractor'],
yt_dlp.utils.ExtractorError: [PearVideo] 1650158: No video formats found!; 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
```



Discussion:

Resolving patch:
diff --git a/yt_dlp/extractor/pearvideo.py b/yt_dlp/extractor/pearvideo.py
--- a/yt_dlp/extractor/pearvideo.py
+++ b/yt_dlp/extractor/pearvideo.py
@@ -4,6 +4,7 @@
 from ..utils import (
     qualities,
     unified_timestamp,
+    traverse_obj,
 )
 
 
@@ -36,6 +37,14 @@ def _real_extract(self, url):
         } for mobj in re.finditer(
             r'(?P<id>[a-zA-Z]+)Url\s*=\s*(["\'])(?P<url>(?:https?:)?//.+?)\2',
             webpage)]
+        if not formats:
+            info = self._download_json(
+                'https://www.pearvideo.com/videoStatus.jsp', video_id=video_id,
+                query={'contId': video_id}, headers={'Referer': url})
+            formats = [{
+                'format_id': k,
+                'url': v.replace(info['systemTime'], f'cont-{video_id}') if k == 'srcUrl' else v
+            } for k, v in traverse_obj(info, ('videoInfo', 'videos'), default={}).items() if v]
         self._sort_formats(formats)
 
         title = self._search_regex(


Test patch: