0
My code below is to take the genre of the movies of the site IMDB, however I’m not knowing to take the tag in specific genres of the site, because sometimes instead of it catch the genre he takes the tag of Keywords, because he takes the first div
that he thinks.
def get_genero(soup):
genero = soup.find ('div', attrs={'class':'see-more inline canwrap'})
print(genero)
if genero != None:
return [a.text for a in genero.findAll('a')]
else:
return None
Being that I need to take only the genres of the movies of the site IMDB. I wanted to know how to get a specific place, using Beautifulsoup.
Link to an example movie page:
Provide the link to the page you are making Scrapping.
– Renan Gomes
https://www.imdb.com/title/tt4575576/? ref_=adv_li_tt
– Daniel Rosendo de Souza