My code below successfully pulled data from https://permit.pcta.org/application/
import requests
from tabulate import tabulate
import time
'''outputs '''
PERMITS = []
'''input'''
url = 'https://permit.pcta.org/manage/ajax/onload-ajax.php'
headers = {
'User-Agent': 'Mozilla/5.0',
'X-Requested-With': 'XMLHttpRequest'
}
r = requests.get(url, headers=headers)
print(r.content)
However, the response is empty. I am positive I didn't change anything in my code, so I can't explain why the website's response is now different.
As a sanity check below are snippets of the element and response from my browser.