Code: Alles auswählen
#Python 2.6
import urllib2
from bs4 import BeautifulSoup
site_golem = urllib2.urlopen("https://www.golem.de/ticker/").read()
lecker_suppe = BeautifulSoup(site_golem, "html.parser")
result = lecker_suppe.find_all("h3", class_="text1")
print "Golem-News-------------------------------------------------------------------------------------------------------"
liste1 = []
def dont_repaeat_this_shit(x,y):
""" Function is my solution for the correct format line by line
first arg =list // second arg = result of soup
"""
x.append(y)
for i in x:
for i in i:
print i
dont_repaeat_this_shit(liste1,result)