xsssniper
xsssniper copied to clipboard
Check availability of lxml
Currently if mechanize is missing xsssniper will say:
[X] Please install mechanize module:
http://wwwsearch.sourceforge.net/mechanize/
But if lxml is missing it will say:
Traceback (most recent call last):
File "xsssniper.py", line 6, in <module>
from core.engine import Engine
File "/home/hsalo/xsssniper/core/engine.py", line 24, in <module>
from core.domscanner import DOMScanner
File "/home/hsalo/xsssniper/core/domscanner.py", line 11, in <module>
from lxml import etree
ImportError: No module named lxml
Maybe xsssniper should also give pip install -commands rather than per project URLs, but that is design decision. Also the import errors are checked several times. Is there a reason for that?
I think it's just been a bad design decision.
Nowadays I'd like more to put a requirements.txt
and have the user go trough it to met the dependencies.
Yes. Using requirements.txt is a good option and if "Please install x module" is used then there should be same mechanism for all components. General stacktrace when module is missing is pretty obvious too.. I can create a pull request for requirements.txt change.
Using requirements.txt is a good way for this I would say.
@gbrindisi Are you still actively maintaining this project?
I am not actively developing, but I can review and merge pull requests :+1:
@gbrindisi Thanks for your quick answer, packaging/releasing/publishing it for pip (#2) would be the next best thing to increase usage and pull requests.
@tholu I will put this in my backlog
Yes, I successfully get the output of the project Thank you.