Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions scrapy/commands/genspider.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from __future__ import print_function
import os
import re
import shutil
import string

Expand Down Expand Up @@ -85,6 +86,7 @@ def run(self, args, opts):

def _genspider(self, module, name, domain, template_name, template_file):
"""Generate the spider module, based on the given template"""
domain = re.split('^https*://', domain)[-1]
tvars = {
'project_name': self.settings.get('BOT_NAME'),
'ProjectName': string_camelcase(self.settings.get('BOT_NAME')),
Expand Down