Python Webscraping Selenium And Beautifulsoup (modal Window Content)
I am trying to learn webscraping (I am a total novice). I noticed that on some websites (for eg. Quora), when I click a button and a new element comes up on screen. I cannot seem t
Solution 1:
Problem resolved. All I had to do was to add one line:
time.sleep(sleep_time)
after generating the click. The problem was because there was no wait time initially, the page source was not getting updated. However with time.sleep sufficiently long (may vary from website to website), the page source finally got updated and I was able to get the required elements. :) Lesson learnt. Patience is the key to web scraping. Spent the entire day trying to figure this out.
Post a Comment for "Python Webscraping Selenium And Beautifulsoup (modal Window Content)"