Skip to content

Commit

Permalink
fix: douyu live url parse
Browse files Browse the repository at this point in the history
  • Loading branch information
ihmily committed Apr 27, 2024
1 parent 2cbe432 commit d46e7dd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions spider.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Author: Hmily
GitHub:https://github.com/ihmily
Date: 2023-07-15 23:15:00
Update: 2024-04-27 21:02:11
Update: 2024-04-27 23:00:11
Copyright (c) 2023 by Hmily, All Rights Reserved.
Function: Get live stream data.
"""
Expand Down Expand Up @@ -341,7 +341,7 @@ def get_token_js(rid: str, did: str, proxy_addr: Union[str, None] = None) -> Uni

@trace_error_decorator
def get_douyu_info_data(url: str, proxy_addr: Union[str, None] = None) -> Dict[str, Any]:
match_rid = re.search('rid=(.*?)&', url)
match_rid = re.search('rid=(.*?)(?=&|$)', url)
if match_rid:
rid = match_rid.group(1)
else:
Expand Down

0 comments on commit d46e7dd

Please sign in to comment.