Forums

localy it is working but not here

When making a request to data from a substitution plan I get everything I need on my machine, but when trying to use it on pythonanywhere it seems not to be able to get the data since it's just giving me 'none'.

import requests
from bs4 import BeautifulSoup
URL = "http://www.gymnasium-templin.de/typo3/vertretung/index.php"
page = requests.get(URL, headers={'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36'})
soup = BeautifulSoup(page.content, "html.parser")
results = soup.find("table", class_="vertretung")
print(results)

on my local machine the output is the html frame here it only is none I even tried it with User-Agent

Free account have limited internet access. See https://www.pythonanywhere.com/whitelist/

okay I see