Skip to content

Commit a45c2ae

Browse files
Restyled by autopep8
1 parent cff81ee commit a45c2ae

File tree

2 files changed

+13
-12
lines changed

2 files changed

+13
-12
lines changed

AmazonChecker/settings.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,38 +33,38 @@
3333
#CONCURRENT_REQUESTS_PER_IP = 16
3434

3535
# Disable coAmazonCheckeries (enabled by default)
36-
#COAMAZON-CHECKERIES_ENABLED = False
36+
# COAMAZON-CHECKERIES_ENABLED = False
3737

3838
# Disable Telnet Console (enabled by default)
3939
#TELNETCONSOLE_ENABLED = False
4040

4141
# Override the default request headers:
42-
#DEFAULT_REQUEST_HEADERS = {
42+
# DEFAULT_REQUEST_HEADERS = {
4343
# 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
4444
# 'Accept-Language': 'en',
4545
#}
4646

4747
# Enable or disable spider middlewares
4848
# See https://doc.scrapy.org/en/latest/topics/spider-middleware.html
49-
#SPIDER_MIDDLEWARES = {
49+
# SPIDER_MIDDLEWARES = {
5050
# 'AmazonChecker.middlewares.Amazon-checkerSpiderMiddleware': 543,
5151
#}
5252

5353
# Enable or disable downloader middlewares
5454
# See https://doc.scrapy.org/en/latest/topics/downloader-middleware.html
55-
#DOWNLOADER_MIDDLEWARES = {
55+
# DOWNLOADER_MIDDLEWARES = {
5656
# 'AmazonChecker.middlewares.Amazon-checkerDownloaderMiddleware': 543,
5757
#}
5858

5959
# Enable or disable extensions
6060
# See https://doc.scrapy.org/en/latest/topics/extensions.html
61-
#EXTENSIONS = {
61+
# EXTENSIONS = {
6262
# 'scrapy.extensions.telnet.TelnetConsole': None,
6363
#}
6464

6565
# Configure item pipelines
6666
# See https://doc.scrapy.org/en/latest/topics/item-pipeline.html
67-
#ITEM_PIPELINES = {
67+
# ITEM_PIPELINES = {
6868
# 'AmazonChecker.pipelines.Amazon-checkerPipeline': 300,
6969
#}
7070

AmazonChecker/spiders/AmazonChecker.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,14 @@ class AmazonChecker(scrapy.Spider):
99

1010
def parse(self, response):
1111
if not self.username or not self.password:
12-
print ('pas bon')
12+
print('pas bon')
1313
else:
1414
return scrapy.FormRequest.from_response(
15-
response,
16-
formdata={'username': self.username, 'password': self.password},
17-
callback=self.after_login
18-
)
15+
response,
16+
formdata={'username': self.username,
17+
'password': self.password},
18+
callback=self.after_login
19+
)
1920

2021
def after_login(self, response):
21-
print (response.body)
22+
print(response.body)

0 commit comments

Comments
 (0)