I'm having an issue when I try to webscrape a website using Selenium library through python. The point is that I want to get some info about songs that are collected into this site: https://bandcamp.com/?g=all&s=top&p=0&gn=0&f=all&w=0.
However, when I try to extract the text from the corresponding html code, the process return an empty list.
If I look at the html code from my browser (Chrome), I'll see the text part, but when I look at the same code in python, the text part does not appear.
Here is my code:
browser = webdriver.Chrome()
browser.get("https://bandcamp.com/?g=all&s=top&p=0&gn=0&f=all&w=0")
name_song = browser.find_elements_by_css_selector("a.item-title")
name_artist = browser.find_elements_by_css_selector("a.item-artist")
genre = browser.find_elements_by_class_name("item-genre")
print(name_song, name artist, genre)
When I print the three variables, I get the html code but there's nothing that I can extract from it. How can I solve this problem? Thanks a lot in advance for your help.
My goal is to get "Apocalypticists" and "Kriegsmachine" and "metal", each assigned to one different variable.
