finished implementing exporting promotion to xlsx table and automatically opening the xlsx file

This commit is contained in:
KorenLazar
2021-06-01 21:00:40 +03:00
parent ec505dba67
commit 27b45a4999
8 changed files with 152 additions and 50 deletions

View File

@@ -19,7 +19,6 @@ class BinaProjectWebClient:
suffix = next(cur_json["FileNm"] for cur_json in jsons_files if f'-{store_id:03d}-20' in cur_json["FileNm"]
and category.name.replace('s', '') in cur_json["FileNm"])
down_url: str = '/'.join([hostname, self.path_prefix, "Download", suffix])
print(down_url)
return down_url
@property

View File

@@ -20,7 +20,6 @@ class CerberusWebClient:
suffix: str = next(d['name'] for d in s_json['aaData'] if f'-{store_id:03d}-20' in d['name'])
download_url: str = hostname + "/file/d/" + suffix
print(download_url)
return download_url
@property

View File

@@ -24,7 +24,6 @@ class MahsaneiHashook(SupermarketChain):
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']
down_url: str = prefix + suffix
print(down_url)
return down_url
@staticmethod

View File

@@ -14,5 +14,4 @@ class Shufersal(SupermarketChain):
req_res: requests.Response = requests.get(url)
soup: BeautifulSoup = BeautifulSoup(req_res.text, features='lxml')
down_url: str = soup.find('a', text="לחץ להורדה")['href']
print(down_url)
return down_url