For some reason the code below does not return any results on different laptop's running the same python version 3.8.1 64bit and I cannot figure out why... I've tried 3 different laptops and chart is printing results only on one of them.
Does anyone have any ideas what might have been different or what's the reason the exact same code works on one machine, but not another?
import requests
from bs4 import BeautifulSoup
def check_facebook():
URL = 'https://downdetector.com/status/facebook/'
browser = {'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.89 Safari/537.36'}
page = requests.get(URL, headers=browser)
soup = BeautifulSoup(page.content, 'html.parser')
chart = soup.find("div",{"class":"popover-container justify-content-center p-relative"}).script.get_text()
print("Facebook chart:", chart)
check_facebook()