mirror of
https://github.com/shmilylty/OneForAll.git
synced 2026-08-26 12:57:50 +08:00
移除$
This commit is contained in:
@@ -40,7 +40,7 @@ def match_subdomain(domain, text, distinct=True):
|
|||||||
:rtype: set or list
|
:rtype: set or list
|
||||||
"""
|
"""
|
||||||
regexp = r'(?:[a-z0-9](?:[a-z0-9\-]{0,61}[a-z0-9])?\.){0,}' \
|
regexp = r'(?:[a-z0-9](?:[a-z0-9\-]{0,61}[a-z0-9])?\.){0,}' \
|
||||||
+ domain.replace('.', r'\.') + '$'
|
+ domain.replace('.', r'\.')
|
||||||
result = re.findall(regexp, text, re.I)
|
result = re.findall(regexp, text, re.I)
|
||||||
if not result:
|
if not result:
|
||||||
return set()
|
return set()
|
||||||
|
|||||||
Reference in New Issue
Block a user