Skip to content

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

make 'basic' the default template spider in genspider, and added info with next steps to startproject. closes #488

Pablo Hoffmane31fb49320a5
diff --git a/scrapy/commands/genspider.py b/scrapy/commands/genspider.py
index 21b5ba3ea..3e2e24b21 100644
--- a/scrapy/commands/genspider.py
+++ b/scrapy/commands/genspider.py
@@ -40,7 +40,7 @@ class Command(ScrapyCommand):
help="Edit spider after creating it")
parser.add_option("-d", "--dump", dest="dump", metavar="TEMPLATE",
help="Dump template to standard output")
- parser.add_option("-t", "--template", dest="template", default="crawl",
+ parser.add_option("-t", "--template", dest="template", default="basic",
help="Uses a custom template.")
parser.add_option("--force", dest="force", action="store_true",
help="If the spider already exists, overwrite it with the template")
diff --git a/scrapy/commands/startproject.py b/scrapy/commands/startproject.py
index eeb04cda9..c266f75c4 100644
--- a/scrapy/commands/startproject.py
+++ b/scrapy/commands/startproject.py
@@ -3,7 +3,7 @@ import sys
import string
import re
import shutil
-from os.path import join, exists
+from os.path import join, exists, abspath
from shutil import copytree, ignore_patterns
import scrapy
@@ -53,3 +53,8 @@ class Command(ScrapyCommand):
string.Template(path).substitute(project_name=project_name))
render_templatefile(tplfile, project_name=project_name,
ProjectName=string_camelcase(project_name))
+ print("New Scrapy project %r created in:" % project_name)
+ print(" %s\n" % abspath(project_name))
+ print("You can start your first spider with:")
+ print(" cd %s" % project_name)
+ print(" scrapy genspider example example.com")