Nov-08-2019, 08:36 AM
Hello there,
I am working on my first Webscraper and have a problem with the pagination of the Website i want to crawl.
This is my code so far:
Thank you so much in advance,
greetings from Germany.
I am working on my first Webscraper and have a problem with the pagination of the Website i want to crawl.
This is my code so far:
import bs4 as bs import urllib.request import pprint import time source = urllib.request.urlopen( 'https://radiobochum.radiosparbox.de/' ).read() soup = bs.BeautifulSoup(source, 'lxml') Anbieter = [] for anbieter in soup.select('h2.artist'): Anbieter.append(str(anbieter.text[1:])) Anzahl = [] for anzahlTi in soup.select('span.stock'): Anzahl.append(str(anzahlTi.text)) westfunk = {} for f, b in zip(Anbieter, Anzahl): westfunk[f] = b print(time.strftime("Statistiken der Westfunk am: " "%d.%m.%Y %H:%M:%S""\n")) print("__________________________________________________________________________") for anbieter_out, anzahl_out in westfunk.items(): print(anbieter_out + ":" + anzahl_out) HEREI know it's not the best but i hope you can help me with my problem.
Thank you so much in advance,
greetings from Germany.
