I wanna get all the p tags and store it in a list, but unfortunately all of them have a
between.
This is how the content looks like:
<p>Ich halt mir die Pistole an den Kopf
<br/>Doch drück' nicht ab, denn ich hab zu viel Angst vor Gott</p>,
<p>Feinde wurden zu Brüdern
<br/>Und Brüder wurden zu V-Männern
<br/>Die beste Gang, in der ich jemals war
<br/>Me, myself und meine DNA</p>,
and i should look like:
[Ich halt mir die Pistole an den Kopf
Doch drück' nicht ab, denn ich hab zu viel Angst vor Gott, Feinde wurden zu Brüdern
Und Brüder wurden zu V-Männern
Die beste Gang, in der ich jemals war
Me, myself und meine DNA,]
Thats my current code:
url = requests.get("https://www.myzitate.de/suche/farid-bang/")
z = bs(url.content)
cont = z.find("div", attrs={"id":"cont"})
cont.find_all("p")
elements in an HTML page using BeautifulSoup](https://stackoverflow.com/questions/10113702/how-to-find-all-text-inside-p-elements-in-an-html-page-using-beautifulsoup)
– mpx Jul 18 '20 at 14:24