Skip to content
Advertisement

Web scraping in Python using Selenium

I am new to web scraping and i am facing a problem. In the appending part, it seems to append only the first row of the table I want to scrape! I am sure I am missing something. Any ideas? Thanks in advance! The code snippet is the following:

JavaScript

Advertisement

Answer

UPD
You are using a wrong locators.
All the parameters you are trying to grab are starting with //*[@id="mw-content-text"]/div[1]/table[2] – this points to a specific table.
To collect the data you are looking for try this:

JavaScript

This is the main problem. The code after that looks correct.
You have no to get contents and tables with this approach

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement