Skip to content

Instantly share code, notes, and snippets.

Forked from Yankim/top20list
Created May 4, 2021
What would you like to do?
br = webdriver.Firefox() #open firefox
###ID number for year, example 1997 has ID of 14486
html_list = br.find_element_by_id("grid")
urls = html_list.find_elements(By.CLASS_NAME, "favorite")
#All top 20 recipes have hearts associated with them. Inside
#the heart contains the unique ID number for the given recipe
for i, e in enumerate(urls):
urls[i] = '' + str(id[i])
#update list of URLS to the 20 recipe URL for a given year
urls = np.unique(urls)
id = np.unique(id)
#remove any repeats
#go to each individual recipe to scrape
for i, url in enumerate(urls):
scrape_recipe(br, year, id[i])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment