Repository: yt-dlp/yt-dlp
Issue category: Feature Request

[BiliBili] extract 720p/1080p format without logging in by passing `'try_look': 1` to the api
### 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 have **updated yt-dlp to nightly or master** ([update instructions](https://github.com/yt-dlp/yt-dlp#update-channels))
- [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)
- [ ] 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

China/Out of China

### Example URLs

https://www.bilibili.com/video/BV1fK4y1t7hj/?spm_id_from=333.337.search-card.all.click&vd_source=...c145ee572cfa536d2947

### Provide a description that is worded well enough to be understood

As mentioned in https://github.com/yt-dlp/yt-dlp/pull/9117#discussion_r1608974583, it is possible to extract 720p/1080p formats(`80`&`64`) without logging in by passing the parameter `'try_look': 1` to the API.
(though premium formats `120`&`116` are still not accessible)

### 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
[BiliBili] Extracting URL: https://www.bilibili.com/video/BV1fK4y1t7hj/?spm_id_from=333.337.search-card.all.click&vd_source=...c145ee572cfa536d2947
[BiliBili] 1fK4y1t7hj: Downloading webpage
[BiliBili] BV1fK4y1t7hj: Extracting videos in anthology
[BiliBili] BV1fK4y1t7hj: Downloading wbi sign
[BiliBili] BV1fK4y1t7hj: Downloading video formats for cid 196018899 
[BiliBili] Format(s) 4K 超清, 1080P 60帧, 1080P 高清, 720P 高清 are missing; you have to login or become a premium member to download them. Use --cookies-from-browser or --cookies for the authentication. See  https://github.com/yt-dlp/yt-dlp/wiki/FAQ#how-do-i-pass-cookies-to-yt-dlp  for how to manually pass cookies
[BiliBili] 883362563: Extracting chapters
[info] Available formats for BV1fK4y1t7hj:
ID     EXT RESOLUTION FPS │  FILESIZE  TBR PROTO │ VCODEC         VBR ACODEC      ABR
─────────────────────────────────────────────────────────────────────────────────────
30216  m4a audio only     │ ≈ 1.71MiB  49k https │ audio only         mp4a.40.5   49k
30232  m4a audio only     │ ≈ 4.72MiB 134k https │ audio only         mp4a.40.2  134k
30280  m4a audio only     │ ≈10.10MiB 287k https │ audio only         mp4a.40.2  287k
30016  mp4 640x290     29 │ ≈12.24MiB 348k https │ avc1.64001E   348k video only
100022 mp4 792x360     30 │ ≈ 7.11MiB 202k https │ av01.0.04M.08 202k video only
30011  mp4 792x360     30 │ ≈10.98MiB 312k https │ hev1.1.6.L120 312k video only
30032  mp4 854x388     29 │ ≈24.20MiB 688k https │ avc1.64001E   688k video only
100023 mp4 1056x480    30 │ ≈15.72MiB 447k https │ av01.0.04M.08 447k video only
30033  mp4 1056x480    30 │ ≈10.57MiB 300k https │ hev1.1.6.L120 300k video only
```



Functions to edit:
yt_dlp/extractor/bilibili.py:BiliBiliIE._real_extract

Patch:
diff --git a/yt_dlp/extractor/bilibili.py b/yt_dlp/extractor/bilibili.py
index 91619d9d5ca9..2db951a6084d 100644
--- a/yt_dlp/extractor/bilibili.py
+++ b/yt_dlp/extractor/bilibili.py
@@ -681,12 +681,6 @@ def _real_extract(self, url):
         old_video_id = format_field(aid, None, f'%s_part{part_id or 1}')
         cid = traverse_obj(video_data, ('pages', part_id - 1, 'cid')) if part_id else video_data.get('cid')
 
-        play_info = (
-            traverse_obj(
-                self._search_json(r'window\.__playinfo__\s*=', webpage, 'play info', video_id, default=None),
-                ('data', {dict}))
-            or self._download_playinfo(video_id, cid, headers=headers, query={'try_look': 1}))
-
         festival_info = {}
         if is_festival:
             festival_info = traverse_obj(initial_state, {
@@ -724,6 +718,13 @@ def _real_extract(self, url):
                 duration=traverse_obj(initial_state, ('videoData', 'duration', {int_or_none})),
                 __post_extractor=self.extract_comments(aid))
 
+        play_info = None
+        if self.is_logged_in:
+            play_info = traverse_obj(
+                self._search_json(r'window\.__playinfo__\s*=', webpage, 'play info', video_id, default=None),
+                ('data', {dict}))
+        if not play_info:
+            play_info = self._download_playinfo(video_id, cid, headers=headers, query={'try_look': 1})
         formats = self.extract_formats(play_info)
 
         if video_data.get('is_upower_exclusive'):