Hi, I'm baffled by this problem. I'm using Beautiful Soup to get information from builtwith.com, and I'm getting a completely different HTML page on PythonAnywhere (it claims there are no results). When I run the same script on my local machine, it works perfectly. I've already tried using headers to make it seem like a browser visit.
Main code in question:
import requests
from bs4 import BeautifulSoup
headers = {'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.102 Safari/537.36'}
url_to_request = input('Enter the URL you would like to scrape > ')
r = requests.get('https://builtwith.com/' + url_to_request, headers=headers)
soup = BeautifulSoup(r.text, 'lxml')
allH3 = soup.findAll('h3')
Except on PythonAnywhere, url_to_request is received by an API call. I've already tested to make sure that it goes to the right URL.
Thanks in advanced for your help.