Created
January 9, 2021 19:59
-
-
Save Galina-Blokh/4db00fd3926ee9eaad35f9c67f8cbd64 to your computer and use it in GitHub Desktop.
Parsing the results of all the requests by iterating through the res_list with bs4
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 bs4 import BeautifulSoup | |
LINK_PATTERN = 'https://www.loveandlemons' | |
soup = [BeautifulSoup(res.text, 'html.parser') for res in response] | |
recipes_links = [link.get('href') for link in soup[0].find_all('a') if | |
str(link.get('href')).startswith(LINK_PATTERN)] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment