update
This commit is contained in:
parent
76d96f0ed5
commit
95ade86be5
|
@ -122,8 +122,7 @@ def get_ip(session: Any, github_url: str) -> Optional[str]:
|
||||||
'06.0.0.0 Safari/537.36'}
|
'06.0.0.0 Safari/537.36'}
|
||||||
try:
|
try:
|
||||||
rs = session.get(url, headers=headers, timeout=5)
|
rs = session.get(url, headers=headers, timeout=5)
|
||||||
table = rs.html.find('.panel-item.table.table-stripes.table-v',
|
table = rs.html.find('#dns', first=True)
|
||||||
first=True)
|
|
||||||
pattern = r"\b(?:[0-9]{1,3}\.){3}[0-9]{1,3}\b"
|
pattern = r"\b(?:[0-9]{1,3}\.){3}[0-9]{1,3}\b"
|
||||||
ip_list = re.findall(pattern, table.text)
|
ip_list = re.findall(pattern, table.text)
|
||||||
best_ip = get_best_ip(ip_list)
|
best_ip = get_best_ip(ip_list)
|
||||||
|
@ -147,7 +146,7 @@ def main(verbose=False) -> None:
|
||||||
# content_list = []
|
# content_list = []
|
||||||
# for index, github_url in enumerate(GITHUB_URLS):
|
# for index, github_url in enumerate(GITHUB_URLS):
|
||||||
# try:
|
# try:
|
||||||
# # ip = get_ip(session, github_url)
|
# ip = get_ip(session, github_url)
|
||||||
#
|
#
|
||||||
# content += ip.ljust(30) + github_url + "\n"
|
# content += ip.ljust(30) + github_url + "\n"
|
||||||
# content_list.append((ip, github_url,))
|
# content_list.append((ip, github_url,))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user