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
|
return
|
||||||
|
|
||||||
def extract_domains(self, resp):
|
def extract_domains(self, resp):
|
||||||
|
links_list = list()
|
||||||
link_regx = re.compile('<cite.*?>(.*?)<\/cite>')
|
link_regx = re.compile('<cite.*?>(.*?)<\/cite>')
|
||||||
try:
|
try:
|
||||||
links_list = link_regx.findall(resp)
|
links_list = link_regx.findall(resp)
|
||||||
|
@ -378,6 +379,7 @@ class AskEnum(enumratorBaseThreaded):
|
||||||
return
|
return
|
||||||
|
|
||||||
def extract_domains(self, resp):
|
def extract_domains(self, resp):
|
||||||
|
links_list = list()
|
||||||
link_regx = re.compile('<p class="web-result-url">(.*?)</p>')
|
link_regx = re.compile('<p class="web-result-url">(.*?)</p>')
|
||||||
try:
|
try:
|
||||||
links_list = link_regx.findall(resp)
|
links_list = link_regx.findall(resp)
|
||||||
|
@ -421,6 +423,7 @@ class BingEnum(enumratorBaseThreaded):
|
||||||
return
|
return
|
||||||
|
|
||||||
def extract_domains(self, resp):
|
def extract_domains(self, resp):
|
||||||
|
links_list = list()
|
||||||
link_regx = re.compile('<li class="b_algo"><h2><a href="(.*?)"')
|
link_regx = re.compile('<li class="b_algo"><h2><a href="(.*?)"')
|
||||||
link_regx2 = re.compile('<div class="b_title"><h2><a href="(.*?)"')
|
link_regx2 = re.compile('<div class="b_title"><h2><a href="(.*?)"')
|
||||||
try:
|
try:
|
||||||
|
@ -465,6 +468,7 @@ class BaiduEnum(enumratorBaseThreaded):
|
||||||
return
|
return
|
||||||
|
|
||||||
def extract_domains(self, resp):
|
def extract_domains(self, resp):
|
||||||
|
links = list()
|
||||||
found_newdomain = False
|
found_newdomain = False
|
||||||
subdomain_list = []
|
subdomain_list = []
|
||||||
link_regx = re.compile('<a.*?class="c-showurl".*?>(.*?)</a>')
|
link_regx = re.compile('<a.*?class="c-showurl".*?>(.*?)</a>')
|
||||||
|
@ -565,6 +569,7 @@ class NetcraftEnum(enumratorBaseThreaded):
|
||||||
url = self.get_next(resp)
|
url = self.get_next(resp)
|
||||||
|
|
||||||
def extract_domains(self, resp):
|
def extract_domains(self, resp):
|
||||||
|
links_list = list()
|
||||||
link_regx = re.compile('<a href="http://toolbar.netcraft.com/site_report\?url=(.*)">')
|
link_regx = re.compile('<a href="http://toolbar.netcraft.com/site_report\?url=(.*)">')
|
||||||
try:
|
try:
|
||||||
links_list = link_regx.findall(resp)
|
links_list = link_regx.findall(resp)
|
||||||
|
|
Loading…
Reference in New Issue