minor changes
This commit is contained in:
18
chains/shufersal.py
Normal file
18
chains/shufersal.py
Normal file
@@ -0,0 +1,18 @@
|
||||
import requests
|
||||
from bs4 import BeautifulSoup
|
||||
|
||||
from supermarket_chain import SupermarketChain
|
||||
|
||||
|
||||
class ShuferSal(SupermarketChain):
|
||||
|
||||
@staticmethod
|
||||
def get_download_url(store_id: int, category: SupermarketChain.XMLFilesCategory, session: requests.Session) -> str:
|
||||
url = f"http://prices.shufersal.co.il/FileObject/UpdateCategory?catID={category.value}"
|
||||
if SupermarketChain.is_valid_store_id(int(store_id)):
|
||||
url += f"&storeId={store_id}"
|
||||
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
|
Reference in New Issue
Block a user