Currently I'm trying to extract the location data from specific IPs in talosintelligence. When I run this code, it returns nothing.
I'm not sure what I'm doing wrong here. In this case, I would prefer for it to return "Charlotte, United States". Instead I just get an empty list.
What am I doing wrong here? Any help is greatly appreciated!
#pip install lxml
#pip install requests
from lxml import html
import requests
page = requests.get('https://talosintelligence.com/reputation_center/lookup?search=198.86.225.18')
tree = html.fromstring(page.content)
#gets talos ip location
talosiploc = tree.xpath('//*[@id="location-data-wrapper"]/table/tr/td/text()')
print(talosiploc)