Added specific searching for the download url of non-full promotions and prices files. Changed return value of get_download_url accordingly.
This commit is contained in:
2
utils.py
2
utils.py
@@ -66,6 +66,8 @@ def get_bs_object_from_link(chain: SupermarketChain, store_id: int, category: Su
|
||||
"""
|
||||
session = requests.Session()
|
||||
download_url: str = chain.get_download_url(store_id, category, session)
|
||||
if not download_url:
|
||||
return BeautifulSoup()
|
||||
response_content = session.get(download_url).content
|
||||
try:
|
||||
xml_content: AnyStr = gzip.decompress(response_content)
|
||||
|
Reference in New Issue
Block a user