main module#
Warning
Module under heavy development
- class main.DeviantArtScrapper(dev=False)[source]#
Bases:
object
- File:
localprice.csv - Contains the steam links and the prices of the items
- File:
failed.csv - Contains the steam links that failed to load due to multiple requests
- File:
deviantXsteam.csv - Contains the links to the deviantart pages and the steam links in the art pages
- Parameters:
dev (bool) – If true, it will skip the login process
- Returns:
None
Initializes the class and loads the data from the csv filesInitializes the selenium driver and logs in to the account requires a username and passwordIf credentials are not provided, it will request for the credentialsOnce credentials are provided, it will login to the account and save the cookiesDev mode is used to skip the login process- file_reload() None [source]#
- Reloads the data from the csv filesThis is used when the data is updated in the csv files
- Returns:
None
- price_finder(save_after: int = 5) None [source]#
- Parameters:
save_after (int) – number of links to be searched before saving the data
- Returns:
None
Accepts a list of deviant art page links, then searches for the steam links in the art pagesIf steam market link is found its added to the deviantXsteam.csv file along with the deviant art page link if not already presentIf no steam market link is found, its still added but with a None value for the steam market linkSaves data every 5 links to avoid data loss in case of an errorsave_after Can be overriden
- steam_links_scrapper(deviant_art_pages: list, save_after: int = 5) None [source]#
- Parameters:
deviant_art_pages (list) – list of deviant art page links which are to be searched for steam links
save_after (int) – number of links to be searched before saving the data default is 5
- Returns:
None
Accepts a list of deviant art page links, then searches for the steam links in the art pagesIf steam market link is found its added to the deviantXsteam.csv file along with the deviant art page link if not already presentIf no steam market link is found, its still added but with a None value for the steam market linkSaves data every 5 links to avoid data loss in case of an errorsaveafter Can be overriden