Skip to content
Open
Show file tree
Hide file tree
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: 1 addition & 1 deletion tutorial/tutorial/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@

SPIDER_MODULES = ['tutorial.spiders']
NEWSPIDER_MODULE = 'tutorial.spiders'
USER_AGENT = '%s/%s' % (BOT_NAME, BOT_VERSION)
USER_AGENT = f'{BOT_NAME}/{BOT_VERSION}'
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lines 14-14 refactored with the following changes:


2 changes: 1 addition & 1 deletion tutorial/tutorial/spiders/dmoz_spider.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def __init__(self, name=None, **kwargs):
if name is not None:
self.name = name
elif not getattr(self, 'name', None):
raise ValueError("%s must have a name" % type(self).__name__)
raise ValueError(f"{type(self).__name__} must have a name")
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function DmozSpider.__init__ refactored with the following changes:

self.__dict__.update(kwargs)
if not hasattr(self, 'start_urls'):
self.start_urls = [
Expand Down