Last active
August 2, 2019 11:40
-
-
Save amitrani6/b58e70c3391dce16efdc44e30f0a8c95 to your computer and use it in GitHub Desktop.
Code to add urls of televisions to the mongo collection
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
#This code adds a list of dictionaries representing television urls and adds them | |
#to a mongo collection. It returns an array of ids for the inserted documents | |
#'first_page_tv_links' is a variable storing the list of dictionaries, | |
#each element in the list follows the format: {'url': tv_link} | |
#The collection is called 'product_info_collection' | |
insertion_results = product_info_collection.insert_many(first_page_tv_links) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment