Here is a good presentation by a cool dude on "Web scrapping - Python".
I am sharing this link with the others.

Web scraping in python:


some code for web scraping using BS4 and selector.

import urllib2
from BeautifulSoup import BeautifulSoup
# or if you're using BeautifulSoup4:
# from bs4 import BeautifulSoup

soup
= BeautifulSoup(urllib2.urlopen('http://www.timeanddate.com/worldclock/astronomy.html?n=78').read())

for row in soup('table', {'class': 'spad'})[0].tbody('tr'):
tds
= row('td')
print tds[0].string, tds[1].string
# will print date and sunrise