Skip to content

Commit

Permalink
wtf python
Browse files Browse the repository at this point in the history
  • Loading branch information
JaneJeon committed Dec 19, 2023
1 parent 50ba99f commit 182b734
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/get_cloudflare_ips.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ def get_cloudflare_ips() -> str:
"""
session = get_session()

ipv4s = session.get(CLOUDFLARE_IPV4_LIST_URL).text.split("\n")
ipv6s = session.get(CLOUDFLARE_IPV6_LIST_URL).text.split("\n")
# with the requests upgrade, urllib3 broke and I need to specify super short timeout for requests to actually work?
ipv4s = session.get(CLOUDFLARE_IPV4_LIST_URL, timeout=1).text.split("\n")
ipv6s = session.get(CLOUDFLARE_IPV6_LIST_URL, timeout=1).text.split("\n")

return sorted(ipv4s + ipv6s)

0 comments on commit 182b734

Please sign in to comment.