May-06-2018, 05:49 PM
import requests headers = { 'User-Agent': "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36" } html = requests.get('http://python-forum.io/', headers=headers).contentIn headers, you can add additional information: https://developer.mozilla.org/en-US/docs...TP/Headers
Python represents itself as Python, not as some web client. So it is obvious for any server that your script is not a browser. Also, you can try Selenium. Scroll down to see how you can use it: https://python-forum.io/Thread-Web-scraping-part-2