Update collect_ips.py
This commit is contained in:
parent
d3227f8a36
commit
69d7e0a487
@ -4,7 +4,7 @@ import re
|
||||
import os
|
||||
|
||||
# 目标URL列表
|
||||
urls = ['https://cf.090227.xyz',
|
||||
urls = ['https://ip.164746.xyz/ipTop10.html',
|
||||
'https://ip.164746.xyz'
|
||||
]
|
||||
|
||||
@ -25,7 +25,7 @@ with open('ip.txt', 'w') as file:
|
||||
soup = BeautifulSoup(response.text, 'html.parser')
|
||||
|
||||
# 根据网站的不同结构找到包含IP地址的元素
|
||||
if url == 'https://cf.090227.xyz':
|
||||
if url == 'https://ip.164746.xyz/ipTop10.html':
|
||||
elements = soup.find_all('tr')
|
||||
elif url == 'https://ip.164746.xyz':
|
||||
elements = soup.find_all('tr')
|
||||
|
Loading…
x
Reference in New Issue
Block a user