Open wzywzy74 opened 2 years ago
我运行也是这个错误,奇怪,看不出来是啥问题
把getweb.py 里面的报错行注销就可以了 else:
in_link.append(url+i)
#else:
# in_link.append(url+'/'+ i)
if i is "": continue if i[0]=='/': in_link.append(url+i) else: in_link.append(url+'/'+ i)
getweb.py 49行 增加一个”“判断
环境:Ubuntu20.04,Python 3.8.10
wzy@wzy-virtual-machine:~/Desktop/Libra$ python3 Libra.py -u http://192.168.10.81
██╗ ██╗██████╗ ██████╗ █████╗ ██║ ██║██╔══██╗██╔══██╗██╔══██╗ ██║ ██║██████╔╝██████╔╝███████║ ██║ ██║██╔══██╗██╔══██╗██╔══██║ ███████╗██║██████╔╝██║ ██║██║ ██║ ╚══════╝╚═╝╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝
Traceback (most recent call last): File "Libra.py", line 19, in
Console()
File "/home/wzy/Desktop/Libra/Framework/Console.py", line 33, in Console
res=getweb.run(args.url)
File "/home/wzy/Desktop/Libra/Moudle/Crawler/getweb.py", line 123, in run
res = poolmana(url)
File "/home/wzy/Desktop/Libra/Moudle/Crawler/getweb.py", line 112, in poolmana
urls = crawler_api(url)
File "/home/wzy/Desktop/Libra/Moudle/Crawler/getweb.py", line 49, in crawler_api
if i[0]=='/':
IndexError: string index out of range
wzy@wzy-virtual-machine:~/Desktop/Libra$