from bs4 import BeautifulSoup
import requests
def parse():
URL = ''
HEADERS = {
''
}
response = requests.get(URL, headers = HEADERS)
soup = BeautifulSoup(response.content, 'html.parser')
items = soup.findAll('div', class_ = 'offer-wrapper')
comps = []
for item in items:
comps.append({
'tittle' : item.find('a', class_ = 'marginright5 link linkWithHash detailsLink linkWithHashPromoted').get_text(strip = True)
})
for comp in comps:
print(comp['title'])
parse()
item.find('a', class_ = 'marginright5 link linkWithHash detailsLink linkWithHashPromoted').get_text(strip = True)