replaced the member '_class_name' by the 'class.__name__'
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
from chains.mahsaneiHashook import MahsaneiHashook
|
||||
from supermarket_chain import SupermarketChain
|
||||
|
||||
|
||||
class Bareket(MahsaneiHashook):
|
||||
class Bareket(MahsaneiHashook, SupermarketChain):
|
||||
pass
|
||||
|
@@ -26,6 +26,5 @@ class CerberusWebClient:
|
||||
return download_url
|
||||
|
||||
@property
|
||||
@abstractmethod
|
||||
def username(self):
|
||||
pass
|
||||
return repr(type(self))
|
||||
|
@@ -1,5 +1,6 @@
|
||||
from chains.mahsaneiHashook import MahsaneiHashook
|
||||
from supermarket_chain import SupermarketChain
|
||||
|
||||
|
||||
class CoOp(MahsaneiHashook):
|
||||
class CoOp(MahsaneiHashook, SupermarketChain):
|
||||
pass
|
||||
|
@@ -4,8 +4,3 @@ from supermarket_chain import SupermarketChain
|
||||
|
||||
class DorAlon(CerberusWebClient, SupermarketChain):
|
||||
_date_hour_format = '%Y-%m-%d %H:%M:%S'
|
||||
_class_name = 'DorAlon'
|
||||
|
||||
@property
|
||||
def username(self):
|
||||
return self._class_name
|
||||
|
@@ -4,8 +4,3 @@ from supermarket_chain import SupermarketChain
|
||||
|
||||
class Freshmarket(CerberusWebClient, SupermarketChain):
|
||||
_date_hour_format = '%Y-%m-%d %H:%M:%S'
|
||||
_class_name = 'Freshmarket'
|
||||
|
||||
@property
|
||||
def username(self):
|
||||
return self._class_name
|
||||
|
@@ -4,8 +4,3 @@ from supermarket_chain import SupermarketChain
|
||||
|
||||
class HaziHinam(CerberusWebClient, SupermarketChain):
|
||||
_date_hour_format = '%Y-%m-%d %H:%M:%S'
|
||||
_class_name = 'HaziHinam'
|
||||
|
||||
@property
|
||||
def username(self):
|
||||
return self._class_name
|
||||
|
@@ -4,8 +4,3 @@ from supermarket_chain import SupermarketChain
|
||||
|
||||
class Keshet(CerberusWebClient, SupermarketChain):
|
||||
_date_hour_format = '%Y-%m-%d %H:%M:%S'
|
||||
_class_name = 'Keshet'
|
||||
|
||||
@property
|
||||
def username(self):
|
||||
return self._class_name
|
||||
|
@@ -22,7 +22,7 @@ class MahsaneiHashook(SupermarketChain):
|
||||
req_res: requests.Response = requests.get(url)
|
||||
soup = BeautifulSoup(req_res.text, features='lxml')
|
||||
suffix: str = soup.find('a', href=lambda value: value and category.name.replace('s', '') in value
|
||||
and f'-{store_id:03d}-20' in value).attrs['href']
|
||||
and f'-{store_id:03d}-20' in value).attrs['href']
|
||||
down_url: str = prefix + suffix
|
||||
print(down_url)
|
||||
return down_url
|
||||
|
@@ -3,10 +3,4 @@ from supermarket_chain import SupermarketChain
|
||||
|
||||
|
||||
class OsherAd(CerberusWebClient, SupermarketChain):
|
||||
|
||||
_date_hour_format = '%Y-%m-%d %H:%M:%S'
|
||||
_class_name = 'OsherAd'
|
||||
|
||||
@property
|
||||
def username(self):
|
||||
return self._class_name
|
||||
|
@@ -4,8 +4,3 @@ from supermarket_chain import SupermarketChain
|
||||
|
||||
class RamiLevi(CerberusWebClient, SupermarketChain):
|
||||
_date_hour_format = '%Y-%m-%d %H:%M:%S'
|
||||
_class_name = 'RamiLevi'
|
||||
|
||||
@property
|
||||
def username(self):
|
||||
return self._class_name
|
||||
|
@@ -4,7 +4,7 @@ from bs4 import BeautifulSoup
|
||||
from supermarket_chain import SupermarketChain
|
||||
|
||||
|
||||
class ShuferSal(SupermarketChain):
|
||||
class Shufersal(SupermarketChain):
|
||||
|
||||
@staticmethod
|
||||
def get_download_url(store_id: int, category: SupermarketChain.XMLFilesCategory, session: requests.Session) -> str:
|
||||
|
@@ -4,8 +4,7 @@ from supermarket_chain import SupermarketChain
|
||||
|
||||
class StopMarket(CerberusWebClient, SupermarketChain):
|
||||
_date_hour_format = '%Y-%m-%d %H:%M:%S'
|
||||
_class_name = 'Stop_Market'
|
||||
|
||||
@property
|
||||
def username(self):
|
||||
return self._class_name
|
||||
return 'Stop_Market'
|
||||
|
@@ -4,7 +4,3 @@ from supermarket_chain import SupermarketChain
|
||||
|
||||
class TivTaam(CerberusWebClient, SupermarketChain):
|
||||
_class_name = 'TivTaam'
|
||||
|
||||
@property
|
||||
def username(self):
|
||||
return self._class_name
|
||||
|
@@ -1,5 +1,6 @@
|
||||
from chains.mahsaneiHashook import MahsaneiHashook
|
||||
from supermarket_chain import SupermarketChain
|
||||
|
||||
|
||||
class Victory(MahsaneiHashook):
|
||||
class Victory(MahsaneiHashook, SupermarketChain):
|
||||
pass
|
||||
|
@@ -4,8 +4,3 @@ from supermarket_chain import SupermarketChain
|
||||
|
||||
class Yohananof(CerberusWebClient, SupermarketChain):
|
||||
_date_hour_format = '%Y-%m-%d %H:%M:%S'
|
||||
_class_name = 'Yohananof'
|
||||
|
||||
@property
|
||||
def username(self):
|
||||
return self._class_name
|
||||
|
Reference in New Issue
Block a user