Forums

Get request freezing

Nothing seems to happen on my get request on the second script uploaded, first also contains a get and post request and they seem to work fine. I am a paid member.

def get_highest_page_number(url):
response = requests.get(url, headers=headers)
print(response.text)
soup = BeautifulSoup(response.content, "html.parser")
page_links = soup.find_all("a", href=True)
page_numbers = [int(link["href"].split("=")[-1]) for link in page_links if link.text.isdigit()]
highest_page = max(page_numbers)
return highest_page

Console shows nothing it doesn’t print anything starting from the get request, have it running’s for hours no errors nothing.

I think we were having some system issues at that time. Is the problem persisting?

Still there unfortunately. Same results as before, just seems frozen, no errors.

Are the two scripts trying to access the same external site, or are they accessing different ones? If they're different, perhaps the one that the second script is trying to access has is blocking incoming requests from cloud computing environments like PythonAnywhere.

Yes second is a different site, maybe that’s it. Is it possible to use a VPN with PythonAnywhere?

No, you won't be able to use VPN.