'Unable to scrap promotion price details from website

I am trying to scrap promotion price details from: https://www.fairprice.com.sg/product/magnolia-fresh-milk-1lt-13022014

Specifically, I'm trying to scrap the "Any 2 for $5.45, Save $1.55" bit of information. When I run the code below, it gives me a null return.

Using the same code on other products in the same website works though (e.g. https://www.fairprice.com.sg/product/kirei-kirei-hand-soap-rfl-moisturing-peach-200ml-12089153 )

Unsure what is causing the difference in behavior. Appreciate any advise on this issue.

import sys
import time
from bs4 import BeautifulSoup
import requests
import re
    
try:
    url = 'https://www.fairprice.com.sg/product/magnolia-fresh-milk-1lt-13022014'
    headers={'User-Agent':'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.99 Safari/537.36 Edg/97.0.1072.69'}
    page=requests.get(url, headers=headers)
except Exception as e:
    error_type, error_obj, error_info = sys.exc_info()
    print ('ERROR FOR LINK:', url)
    print (error_type, 'Line:', error_info.tb_lineno)
    
time.sleep(2)
soup=BeautifulSoup(page.text,'html.parser')
linkpromo=soup.find_all('span',attrs={'class':'sc-1bsd7ul-1 eSToaS'},string=re.compile(r'Any'))   

print(linkpromo) 


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source