I'm trying to scrape some simple data from an XML file that is only accessible as an HTML page.
import requests
import pprint
import pandas as pd
from bs4 import BeautifulSoup
url = "https://musicbrainz.org/ws/2/artist/?query=artist:massive-attack"
resp = requests.get(url).text
soup = BeautifulSoup(resp, 'html.parser')
something = soup.find_all(string="artist")
metadata = soup.select("#folder0 > div:nth-child(1)")
beginarea = soup.select("#folder3 > div.opened > div:nth-child(1) > span:nth-child(2)")
print(something)
Whenever I try to select an element and print its contents, I get []. I've tried selector and the BeautifulSoup search methods, as well as parsing it as an XML file with ElementTree. What am I missing here? I can't seem to get any data from the page at all. Thank you.