Skip to content

Instantly share code, notes, and snippets.

@haider11234
Last active May 8, 2020 14:37
Show Gist options
  • Save haider11234/a73b62d4df511e06f3e36d03c143e58d to your computer and use it in GitHub Desktop.
Save haider11234/a73b62d4df511e06f3e36d03c143e58d to your computer and use it in GitHub Desktop.
import requests
from bs4 import BeauftifulSoup
req_headers = {
'accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8',
'accept-encoding': 'gzip, deflate, br',
'accept-language': 'en-US,en;q=0.8',
'upgrade-insecure-requests': '1',
'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36'
}
with requests.Session() as s:
url="https://www.zillow.com/homes/872-OLD-HICKORY-RD--PITTSBURGH,-PA-15243_rb/11659068_zpid/"
r=requests.get(url,headers=req_headers)
print(r)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment