Use BeautifulSoup to obtain “View Element” code instead of “View Source” code
问题 I'm using the following code to obtain all <script>...</script> content from a webpage (see url in code): import urllib2 from bs4 import BeautifulSoup import re import imp url = "http://racing4everyone.eu/2015/10/25/formula-e-201516formula-e-201516-round01-china-race/" page = urllib2.urlopen(url) soup = BeautifulSoup(page.read()) script = soup.find_all("script") print script #just to check the output of script However, BeautifulSoup searches within the source code (Ctrl+U in chrome) of the