import requests from bs4 import BeautifulSoup def is_restaurant_open(name): r = requests.get("https://www.just-eat.dk/area/8000-%C3%A5rhusc") soup = BeautifulSoup(r.content, features='html5lib') print(soup.find('div', {'data-test-id': 'listingGroupOpen'})) is_restaurant_open("stop2shop")