Skip to content

Commit 834882f

Browse files
committed
feat: adds command line argument option.
1 parent 972e757 commit 834882f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

amazon_book_scraper/__main__.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import sys
12
from os import getcwd
23
from local_raw_data_storage import LocalRawDataStorage
34
from s3_raw_data_storage import S3RawDataStorage
@@ -37,4 +38,6 @@
3738
rds_data_storage=rds_storage,
3839
browser='firefox')
3940
# run the scraper
40-
aabs.scrape_books(num_books=7, num_reviews=7)
41+
num_books = sys.argv[1]
42+
num_reviews = sys.argv[2]
43+
aabs.scrape_books(num_books=num_books, num_reviews=num_reviews)

0 commit comments

Comments
 (0)