Skip to content

Commit

Permalink
refine regex
Browse files Browse the repository at this point in the history
  • Loading branch information
simonsmh authored Dec 12, 2023
1 parent 237de7d commit db27aaf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions biliparser.py
Original file line number Diff line number Diff line change
Expand Up @@ -847,10 +847,10 @@ async def feed_parser(client: httpx.AsyncClient, url: str):
elif "live" in url:
return await live_parser(client, url)
# API link blackboard link user space link
elif re.search(r"^(?:https:\/\/)(?:api|www\.bilibili\.com\/blackboard|space\.bilibili\.com)", url):
elif re.search(r"^https?:\/\/(?:api|www\.bilibili\.com\/blackboard|space\.bilibili\.com)", url):
pass
# dynamic opus
elif re.search(r"^https:\/\/[th]\.|dynamic|opus", url):
elif re.search(r"^https?:\/\/[th]\.|dynamic|opus", url):
return await opus_parser(client, url)
raise ParserException("URL错误", url)

Expand Down

0 comments on commit db27aaf

Please sign in to comment.