I was trying to scrape the number of flights for this webpage https://www.flightradar24.com/56.16,-49.51
The number is highlighted in the picture below:
The num
You can use selenium to crawl a webpage with dynamic content added by javascript.
from bs4 import BeautifulSoup
from selenium import webdriver
browser = webdriver.PhantomJS()
browser.get('https://www.flightradar24.com/56.16,-49.51/3')
soup = BeautifulSoup(browser.page_source, "html.parser")
result = soup.find_all("span", {"id": "menuPlanesValue"})
for item in result:
print(item.text)
browser.quit()