Skip to content

Scrapy, a fast high-level web crawling & scraping framework for Python.

bandit: ignore md5 usage for download slot names

Adrián Chaves31cbbb57584f
diff --git a/scrapy/pqueues.py b/scrapy/pqueues.py
index b62d2fe58..593667f1f 100644
--- a/scrapy/pqueues.py
+++ b/scrapy/pqueues.py
@@ -20,7 +20,7 @@ def _path_safe(text):
pathable_slot = "".join([c if c.isalnum() or c in "-._" else "_" for c in text])
# as we replace some letters we can get collision for different slots
# add we add unique part
- unique_slot = hashlib.md5(text.encode("utf8")).hexdigest()
+ unique_slot = hashlib.md5(text.encode("utf8")).hexdigest() # nosec
return "-".join([pathable_slot, unique_slot])