I’m using selenium to web scrape from this website because it gets blocked when I use beautiful soup. The link that I want to click is highlighted in the screenshot, and its html code is highlighted on the right when I inspect element. I copied the xpath for that part of the html code. But then when I try to click the link using link.click() it says that I can’t do it because it is a ‘list’ object. I also can’t print it or do anything else with it like .get_attribute(‘href’). Please let me know if you have any advice for fixing this specific issue or if I should go about it another way!
I tried originally using beautiful soup but the website does not allow that. I also tried printing the link but get issues like I described above. I was expecting to get the text from the link and not an error.
Brandon Munson is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.