Skip to content

Commit

Permalink
Merge pull request #513 from Guovin/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
Guovin authored Nov 5, 2024
2 parents 47be84d + db57d76 commit 4777370
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion updates/fofa/request.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def process_fofa_channels(fofa_info):
page_source = retry_func(
lambda: get_source_requests(fofa_url), name=fofa_url
)
if "资源访问每天限制" in page_source:
if "禁止访问" in page_source or "资源访问每天限制" in page_source:
cancel_event.set()
raise ValueError("Limited access to fofa page")
fofa_source = re.sub(r"<!--.*?-->", "", page_source, flags=re.DOTALL)
Expand Down
12 changes: 8 additions & 4 deletions utils/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,9 @@ def get_total_urls_from_info_list(infoList, ipv6=False):
continue

if origin == "important":
pure_url, _, info = url.partition("$")
new_info = info.partition("!")[2]
total_urls.append(f"{pure_url}${new_info}" if new_info else pure_url)
im_url, _, im_info = url.partition("$")
im_info_value = im_info.partition("!")[2]
total_urls.append(f"{im_url}${im_info_value}" if im_info_value else im_url)
continue

if origin == "subscribe" and "/rtp/" in url:
Expand All @@ -156,9 +156,13 @@ def get_total_urls_from_info_list(infoList, ipv6=False):
if resolution_value < config.min_resolution_value:
continue

pure_url, _, info = url.partition("$")
if not info:
url = add_url_info(pure_url, origin)

url_is_ipv6 = is_ipv6(url)
if url_is_ipv6:
url += "|IPv6"
url = add_url_info(url, "IPv6")

if url_is_ipv6:
categorized_urls[origin]["ipv6"].append(url)
Expand Down

0 comments on commit 4777370

Please sign in to comment.