chore: refactor proxy gathering into dedicated function
This commit is contained in:
parent
ed7757ab8f
commit
117d88b92d
11
main.py
11
main.py
@ -29,10 +29,7 @@ def write_file(path, data):
|
||||
file.write(data)
|
||||
|
||||
|
||||
def main():
|
||||
"""Main entry point."""
|
||||
logging.basicConfig(level=logging.WARN)
|
||||
|
||||
def gather_proxies():
|
||||
# Load proxy source list and fetch proxies
|
||||
urls = read_file('data/proxy-sources.txt')
|
||||
proxies = fetch_all(urls)
|
||||
@ -95,5 +92,11 @@ def main():
|
||||
)
|
||||
|
||||
|
||||
def main():
|
||||
"""Main entry point."""
|
||||
logging.basicConfig(level=logging.WARN)
|
||||
gather_proxies()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
Loading…
Reference in New Issue
Block a user