Skip to content

Commit

Permalink
unescape '\\/' and '\/' in url
Browse files Browse the repository at this point in the history
  • Loading branch information
wzdnzd committed Nov 11, 2024
1 parent d5c0796 commit 66708f3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions subscribe/crawl.py
Original file line number Diff line number Diff line change
Expand Up @@ -1125,10 +1125,12 @@ def extract_subscribes(
items.extend([x for x in url.split("|") if not re.match(extra_regex, x, flags=re.I)])

for s in items:
s = re.sub(r"\\/|\/", "/", s, flags=re.I)
try:
if include and not re.match(
r"https?://(?:[a-zA-Z0-9\u4e00-\u9fa5\-]+\.)+[a-zA-Z0-9\u4e00-\u9fa5\-]+.*",
s,
flags=re.I,
):
continue

Expand Down

0 comments on commit 66708f3

Please sign in to comment.