Last active
January 10, 2021 20:18
-
-
Save Galina-Blokh/d17b0ec042591821cb34c0cb1e41e554 to your computer and use it in GitHub Desktop.
Get all recipe responces at one time
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
from collections import defaultdict | |
json_file = defaultdict(list) | |
page = (grequests.get(url) for url in set(recipe_links)) | |
response = grequests.map(page, size=batches) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment