E
E
Evgeny Lavrov2019-11-08 20:35:27
Python
Evgeny Lavrov, 2019-11-08 20:35:27

How to parse sites in python 3 through hosting https://www.pythonanywhere.com/?

The code:

import requests
header = {'User-Agent': 'Mozilla/5.0 (X11; NetBSD) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.116 Safari/537.36'}
session = requests.Session()
request = session.get("http://lostfilm.tv/series/" , headers = header)
print(request)

Run on computer:
5dc5a67aa4b6d675053776.png
Received response from site 200 (can parse data)
Run on hosting ( https://www.pythonanywhere.com/)
5dc5a6ecea6cf224336419.png
Received response from site 403 (cannot parse data)
How do I parse from hosting?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
AWEme, 2019-11-08
@lavrov2002

The free pythonanyware account has limitations, namely a limited list of sites to which you can send requests. Read more here .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question