Quantcast
Channel: Active questions tagged python - Stack Overflow
Viewing all articles
Browse latest Browse all 23131

Some divs didn't appear during web-scraping

$
0
0

I'm new to web-scraping and I try to scrape the content from this website:INFOBANJIR JPS SELANGOR

This is the content that I'm trying to scrape:ONLINE RAINFALL DATA (MM)

This is my code:

from bs4 import BeautifulSoupimport requestsurl = 'http://infobanjirjps.selangor.gov.my/flood-gauge-data.html?districtId=4&lang=en'page = requests.get(url)soup = BeautifulSoup(page.text, 'html')soup.find_all('table', id='tableRainfall')

But, the output only shows thisOutput

Then, I try to find the div by using id = 'tableDataRainfall', but still, the output shows the same thing as before.

It seems like the html inside of the division is missing. I'm sorry if it's a stupid question, but I just wanna know why. Thank you in advance!


Viewing all articles
Browse latest Browse all 23131

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>