What I am trying to do is make a program that goes to the website https://www.dan.me.uk/tornodes, takes what tor node IP addresses are on that website and checks to see if there is a match on my list of IP addresses.
Using Python
import requests
from bs4 import BeautifulSoup
page = requests.get('https://www.dan.me.uk/tornodes')
if "<!--__BEGIN_TOR_NODE_LIST__-->" not in page.content:
print("LIST IS NOT READY")
else:
list_text = page.content.split("<!--__BEGIN_TOR_NODE_LIST__-->")[1] #TAKES EVERYTHING AFTER THIS
list_text = list_text.split("<!--__END_TOR_NODE_LIST__-->")[1] #TAKES EVERYTHING BEFORE THIS
line_list = [line.strip() ]
for line in list_text.split("<br>"):
line_ip = line.strip().split("|")[0]
#DO WHAT YOU WANT NOW
if line_ip in my_known_ip_list:
print("THIS IS GOOD" % line_ip)
Greatly appreciate any help given to me in advance.