Skip to content

Instantly share code, notes, and snippets.

@MohamedRajabMohammed
Created July 16, 2020 22:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MohamedRajabMohammed/6c58283d6744a484477505bbb0f96c46 to your computer and use it in GitHub Desktop.
Save MohamedRajabMohammed/6c58283d6744a484477505bbb0f96c46 to your computer and use it in GitHub Desktop.
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