Skip to content

Instantly share code, notes, and snippets.

@MohamedRajabMohammed
Created July 16, 2020 21:42
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/3630ade352af569ffc627cf45a88ebe3 to your computer and use it in GitHub Desktop.
Save MohamedRajabMohammed/3630ade352af569ffc627cf45a88ebe3 to your computer and use it in GitHub Desktop.
def get_product_history(asin):
new = db["products"]
try:
find = new.find_one({"asin": asin}, {"_id": 0})
if find:
return find
except Exception as identifier:
print(identifier)
return None
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment