Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions domainCrawler.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

#!/usr/bin/env python2
# Copyright (C) 2011 Pau Escrich <pau@dabax.net>
#
Expand Down Expand Up @@ -31,6 +32,10 @@

class SimpleBrowser(FancyURLopener):
version = "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6"
# Redefine
def get_user_passwd(self, host, realm, clear_cache=0):
print "get_user_passwd() called; host %s, realm %s" % (host, realm)
raise Exception('I know Python!') # don't, if you catch, likely to hide bugs.

class crawler():
def __init__(self,url,db):
Expand Down