DanMcInerney/xsscrapy

Urlparse Module not found

Sydwicked opened this issue · 3 comments

root@kali:~/xsscrapy# ./xsscrapy.py -h
Traceback (most recent call last):
File "./xsscrapy.py", line 5, in
from xsscrapy.spiders.xss_spider import XSSspider
File "/root/xsscrapy/xsscrapy/spiders/xss_spider.py", line 9, in
from urlparse import urlparse, parse_qsl, urljoin, urlunparse, urlunsplit
ModuleNotFoundError: No module named 'urlparse'

root@kali:~/xsscrapy# pip install urlparse
Collecting urlparse
Could not find a version that satisfies the requirement urlparse (from versions: )
No matching distribution found for urlparse

What version of python are you using?

@Sydwicked , I also had the same issue. This error has occured with python 3.x environment and xssscrapy module is supported only with python 2.x. So to fix it you have to change in file xsscrapy/xss_spider.py line 9,
change
from urlparse import urlparse, parse_qsl, urljoin, urlunparse, urlunsplit
to
import urllib.parse as urlparse
from urllib.parse import parse_qsl, urljoin, urlunparse, urlunsplit.

Hope it helps!

Traceback (most recent call last):
File "/home/kali/Desktop/xsscrapy/xsscrapy.py", line 5, in
from xsscrapy.spiders.xss_spider import XSSspider
File "/home/kali/Desktop/xsscrapy/xsscrapy/spiders/xss_spider.py", line 9, in
from urlparse import urlparse, parse_qsl, urljoin, urlunparse, urlunsplit
ModuleNotFoundError: No module named 'urlparse'