finished webscrapper
This commit is contained in:
@@ -15,7 +15,7 @@ class TopGamesUpdater:
|
||||
self.__return_value = []
|
||||
|
||||
def updater(self):
|
||||
self.__source = bin.lib.website_source_grabber.WebsiteSourceGrabber().grabber()
|
||||
self.__source = bin.lib.website_source_grabber.WebsiteSourceGrabber().grabber("https://store.steampowered.com/search/?filter=topsellers")
|
||||
self.list_generator()
|
||||
|
||||
def list_generator(self):
|
||||
@@ -7,8 +7,6 @@ class WebsiteSourceGrabber:
|
||||
self.__res = ""
|
||||
self.__request_done = ""
|
||||
|
||||
def grabber(self):
|
||||
self.__website = "https://store.steampowered.com/search/?filter=topsellers"
|
||||
self.__res = requests.get(self.__website)
|
||||
self.__request_done = self.__res.text
|
||||
return self.__request_done
|
||||
def grabber(self, website):
|
||||
self.__res = requests.get(website).text
|
||||
return self.__res
|
||||
|
||||
@@ -47,14 +47,6 @@ class PriceExtractor:
|
||||
self.__productnumber = 0
|
||||
return self.__raw_list
|
||||
|
||||
def chg_website(self, website):
|
||||
"""Change the website (exact URL to product on https://digitec.ch/ only currently). Arguments:
|
||||
Website. Only put direct link to product on digitec. Will return an error if a link other than digitec is
|
||||
specified, though might work if the website structure is similar.
|
||||
|
||||
Example: PriceExtractor.chg_website(https://www.digitec.ch/de/s1/product/asus-radeon-rx-6600-dual-8-gb-grafikkarte-16833213)"""
|
||||
self.__website = website
|
||||
|
||||
def digitec_extractor(self):
|
||||
"""Run through the entire list of links specified in the csv file that was selected either when loading the
|
||||
function or when specified through the method \"readfile\". NOTE: This method does not require any additional
|
||||
|
||||
Reference in New Issue
Block a user