File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
src/plugins/bilibili/plugins/dynamic Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -176,8 +176,9 @@ async def broadcast(dynamic: Dynamic):
176176@backoff .on_exception (backoff .constant , TimeoutError , max_tries = 3 )
177177async def render_screenshot (id_str : str ) -> bytes :
178178 async with get_new_page () as page :
179- await page .goto (f"https://t .bilibili.com/{ id_str } " )
179+ await page .goto (f"https://m .bilibili.com/opus /{ id_str } " )
180180
181+ await page .wait_for_load_state ("domcontentloaded" )
181182 await page .add_style_tag (
182183 content = """
183184 @font-face {
@@ -304,7 +305,10 @@ async def _(db: async_scoped_session, sess: EventSession):
304305async def _ (id_str : str ):
305306 try :
306307 dynamic = raise_for_status (
307- await client .get ("/polymer/web-dynamic/v1/detail" , params = {"id" : id_str })
308+ await client .get (
309+ "/polymer/web-dynamic/v1/detail" ,
310+ params = {"id" : id_str , "features" : "itemOpusStyle" },
311+ )
308312 )["item" ]
309313 except Exception :
310314 await handle_error ("获取动态信息失败" )
You can’t perform that action at this time.
0 commit comments