def scrape(url): rawJSON = requests.get(url) data = json.loads(rawJSON.text) recipes = data["recipes"] for recipe in recipes: if recipe["publisher"] == "All Recipes": #print recipe["source_url"] AllRecipes.scrapeRecipe(recipe["source_url"], recipe["title"]) if recipe["publisher"] == "Tasty Kitchen": TastyKitchen.scrape(recipe["source_url"])
def scrape(url): rawJSON = requests.get(url) data = json.loads(rawJSON.text) recipes = data["recipes"] for recipe in recipes: if recipe["publisher"] == "All Recipes": #print recipe["source_url"] AllRecipes.scrapeRecipe(recipe["source_url"], recipe["title"]) if recipe["publisher"] == "Tasty Kitchen": TastyKitchen.scrape(recipe["source_url"]) #scrape("http://food2fork.com/api/search?key=b86b8857efb9349636cdf6f2e8f75503&q=sandwich&page=1")