I\'m writing a python script which will extract the script locations after parsing from a webpage. Lets say there are two scenarios :
Get 'src' from script node.
import requests from bs4 import BeautifulSoup r = requests.get("http://rediff.com/") data = r.text soup = BeautifulSoup(data) for n in soup.find_all('script'): print "src:", n.get('src') <====