Skip to content

Instantly share code, notes, and snippets.

@Galina-Blokh
Created January 9, 2021 19:59
Show Gist options
  • Save Galina-Blokh/4db00fd3926ee9eaad35f9c67f8cbd64 to your computer and use it in GitHub Desktop.
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
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