Posted by iggykoopa on Mon 26th Jan 02:47 (modification of post by iggykoopa view diff)
View followups from iggykoopa | diff | download | new post
- #!/usr/bin/env python
- import urllib2
- from BeautifulSoup import BeautifulSoup
- address = "http://distrowatch.com/"
- try:
- website = urllib2.urlopen(address)
- soup = BeautifulSoup(''.join(website))
- rankings = soup.find(text= "Page Hit Ranking").parent.parent.parent.find(text="CrunchBang").parent.parent.parent.find("th").string
- print rankings
- except:
- print "Not Available"
Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.