I was trying to get the websites of firms from Bloomberg using XPath. I was stuck because it always return an empty list. I did several tests and found I can't locate any elements on this webpage. This is the code I'm using.
import re
import requests
from lxml import html
url = "https://www.bloomberg.com/profile/company/FWLT:US"
requests=requests.get(url)
tree = html.fromstring(requests.content)
website = tree.xpath('//*[@id="root"]/div/section/div[2]/section/div/section[7]/div/text()')
print(website)
I also tried selenium but ended up in the same problem. Can someone help me solve this?
To continue, please click the box below to let us know you\'re not a robot
– Alin Stelian Sep 15 '20 at 19:23