Ich verwende Python-Modul "re" wie folgt:Pythons "Re" Modul funktioniert nicht?
request = get("http://www.allmusic.com/album/warning-mw0000106792")
print re.findall('<hgroup>(.*?)</hgroup>', request)
Alles, was ich tue, ist das HTML this site bekommen, und für diesen speziellen Code-Snippet suchen:
<hgroup>
<h3 class="album-artist">
<a href="http://www.allmusic.com/artist/green-day-mn0000154544">Green Day</a> </h3>
<h2 class="album-title">
Warning </h2>
</hgroup>
jedoch Es wird weiterhin ein leeres Array gedruckt. Warum ist das? Warum kann dieses Snippet nicht gefunden werden?
Was ist ''? Was sollte das zusammenbringen? – Joe