Skip to content

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

fixed command list

LMKight6352c2e9b202
diff --git a/scrapy/cmdline.py b/scrapy/cmdline.py
index cb7bbd64d..05b0a12e0 100644
--- a/scrapy/cmdline.py
+++ b/scrapy/cmdline.py
@@ -27,8 +27,9 @@ def _get_commands_from_module(module, inproject):
d = {}
for cmd in _iter_command_classes(module):
if inproject or not cmd.requires_project:
- cmdname = cmd.__module__.split('.')[-1]
- d[cmdname] = cmd()
+ if not cmd.__module__ == module:
+ cmdname = cmd.__module__.split('.')[-1]
+ d[cmdname] = cmd()
return d
def _get_commands_from_entry_points(inproject, group='scrapy.commands'):