Created
July 16, 2020 22:09
-
-
Save MohamedRajabMohammed/6c58283d6744a484477505bbb0f96c46 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import db | |
import scraper | |
import time | |
URL = "https://www.amazon.in/dp/B077Q42J32/" | |
def track(): | |
details = scraper.get_product_details(URL) | |
result = "" | |
if details is None: | |
result = "not done" | |
else: | |
inserted = db.add_product_detail(details) | |
if inserted: | |
result = "done" | |
else: | |
result = "not done" | |
return result | |
while True: | |
print(track()) | |
time.sleep(60) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment