Skip to content

Commit

Permalink
chore:fafa region
Browse files Browse the repository at this point in the history
  • Loading branch information
Guovin committed Sep 5, 2024
1 parent fdb54ed commit 64777fc
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions updates/fofa/request.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ def get_fofa_urls_from_region_list():
"""
Get the FOFA url from region
"""
# region_list = config.get("Settings", "hotel_region_list").split(",")
region_list = config.get("Settings", "hotel_region_list").split(",")
urls = []
region_url = getattr(fofa_map, "region_url")
# if "all" in region_list or "ALL" in region_list or "全部" in region_list:
urls = [url for url_list in region_url.values() for url in url_list if url]
# else:
# for region in region_list:
# if region in region_url:
# urls.append(region_url[region])
if "all" in region_list or "ALL" in region_list or "全部" in region_list:
urls = [url for url_list in region_url.values() for url in url_list if url]
else:
for region in region_list:
if region in region_url:
urls.append(region_url[region])
return urls


Expand Down

0 comments on commit 64777fc

Please sign in to comment.