How to crawl web pages that change the active tab after page loading into Python?

Asked 2 weeks ago, Updated 2 weeks ago, 3 views


Writing code for crawling.

If you run the URL above with a browser, you can see that the 2019 tab is activated when the web page is loaded and then changes to the 2018 tab after the loading is completed.

I just crawled this page to Request or Selenium, and I only crawled the value with the 2019 tab activated, so is there a way to crawl it after waiting until the 2018 tab changes?

I don't know much about HTML or javascript, so I can't progress because it's blocked here.

I'd appreciate your help.

python selenium

2022-09-20 11:16

1 Answers

HTML tags corresponding to 2018 tabs at certain times:

<div class=" choose-combination-label">

Why don't you check to see if the active class is attached?

The CSS Path in the above tag is div.choose-combination-label:nth-child(2).

// // "choose-combination-label active"

2022-09-20 11:16

If you have any answers or tips

© 2022 pinfo. All rights reserved.