I tried to web-scraping from a website with Python 2.7, where there is a table which one have to loading. If I am trying to web-scraping it, i get only that : "Loading" or "Sorry, we don't have any information about it" because it has to loading first..
I read some article and code, but nothing worked.
My codes:
import urllib2, sys
from BeautifulSoup import BeautifulSoup
import json
site= "https://www.flightradar24.com/data/airports/bud/arrivals"
hdr = {'User-Agent': 'Mozilla/5.0'}
req = urllib2.Request(site,headers=hdr)
page = urllib2.urlopen(req)
soup = BeautifulSoup(page)
nev = soup.find('h1' , attrs={'class' : 'airport-name'})
print nev
table = soup.find('div', { "class" : "row cnt-schedule-table" })
print table
import urllib2
from bs4 import BeautifulSoup
import json
# new url
url = 'https://www.flightradar24.com/data/airports/bud/arrivals'
# read all data
page = urllib2.urlopen(url).read()
# convert json text to python dictionary
data = json.loads(page)
print(data['row cnt-schedule-table'])