Exemple #1
0
"""
This script just for test and learn how to crawl web pages using python

"""

from parser import Parser
from crawl import Crawl

c = Crawl()
c.fetch('http://www.blogfa.com/')

p = Parser()
p.set_html(c.content)

p.get_title()
p.get_links()

print "count of links: %s" % len(p.links)
print "title of current url: %s" % p.title