Skip to content
Advertisement

Can’t Find Javascript href Link in Python Webscrape

I’m trying to webscrape this site: https://www2.tse.or.jp/tseHpFront/JJK020010Action.do

Using the Selenium package, with Google Chrome as my browser, I’m able to open it up, choose some settings, and then run a search. I’m encountering an error because there are 21 pages of information, and I need to gather all of it, however with my code I am unable to find the link that clicks to the next page. This is what that next button’s code is:

JavaScript

Note — the number in the brackets after ‘setPage’ corresponds to the next page number. So if I’m on page 1 the code would read setPage(2), etc.

Here is my complete code for the webscrape:

JavaScript

The other options I have tried to click this href (all of which haven’t worked), include:

JavaScript
JavaScript
JavaScript
JavaScript

Please let me know if you have a solution or need further clarification on the issue. Thank you!

Advertisement

Answer

JavaScript

Using this work just fine for going through the pages.

Import:

JavaScript
Advertisement