Module Documentation

class psnstoreprice.PsnStorePrice
getpage(url, sleep_time=5)

Get the page and raise if status_code is not equal to 200

Parameters:
  • url(string) – normalized(url)
  • sleep_time(int) – Time to wait until take the data (default 5s)
Returns:

bs4(html)

getprice(url, sleep_time=5)

Find the price on AmazonStore starting from URL

Parameters:
  • url(string) – url
  • sleep_time(int) – Time to wait until take the data (default 5s)
Returns:

float(price cleaned)

normalizeprice(price)

remove the currenty from price

Parameters:price(string) – price tag find on amazon store
Returns:float(price cleaned)
normalizeurl(url)

clean the url and check if all element required is present

Parameters:url(string) – PSN store url
Returns:string(url cleaned)

Indices and tables