Fix issue #108 local variable 'links' referenced before assignment, and apply similar fix to functions with similar issue
This commit is contained in:
parent
def05273f7
commit
52089f5761
|
@ -278,6 +278,7 @@ class GoogleEnum(enumratorBaseThreaded):
|
|||
return
|
||||
|
||||
def extract_domains(self, resp):
|
||||
links_list = list()
|
||||
link_regx = re.compile('<cite.*?>(.*?)<\/cite>')
|
||||
try:
|
||||
links_list = link_regx.findall(resp)
|
||||
|
@ -378,6 +379,7 @@ class AskEnum(enumratorBaseThreaded):
|
|||
return
|
||||
|
||||
def extract_domains(self, resp):
|
||||
links_list = list()
|
||||
link_regx = re.compile('<p class="web-result-url">(.*?)</p>')
|
||||
try:
|
||||
links_list = link_regx.findall(resp)
|
||||
|
@ -421,6 +423,7 @@ class BingEnum(enumratorBaseThreaded):
|
|||
return
|
||||
|
||||
def extract_domains(self, resp):
|
||||
links_list = list()
|
||||
link_regx = re.compile('<li class="b_algo"><h2><a href="(.*?)"')
|
||||
link_regx2 = re.compile('<div class="b_title"><h2><a href="(.*?)"')
|
||||
try:
|
||||
|
@ -465,6 +468,7 @@ class BaiduEnum(enumratorBaseThreaded):
|
|||
return
|
||||
|
||||
def extract_domains(self, resp):
|
||||
links = list()
|
||||
found_newdomain = False
|
||||
subdomain_list = []
|
||||
link_regx = re.compile('<a.*?class="c-showurl".*?>(.*?)</a>')
|
||||
|
@ -565,6 +569,7 @@ class NetcraftEnum(enumratorBaseThreaded):
|
|||
url = self.get_next(resp)
|
||||
|
||||
def extract_domains(self, resp):
|
||||
links_list = list()
|
||||
link_regx = re.compile('<a href="http://toolbar.netcraft.com/site_report\?url=(.*)">')
|
||||
try:
|
||||
links_list = link_regx.findall(resp)
|
||||
|
|
Loading…
Reference in New Issue