(Jan-27-2020, 11:59 AM)Larz60+ Wrote: Please show the code you are using, this looks like a binary dump.
from lxml import html from bs4 import BeautifulSoup import requests import pandas as pd import json import argparse import os import re import xlrd url = 'https://www.zameen.com/Rentals/Islamabad_Green_Avenue-8566-1.html' headers = { 'accept':'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8', 'accept-encoding':'gzip, deflate, sdch, br', 'accept-language':'en-GB,en;q=0.8,en-US;q=0.6,ml;q=0.4', 'cache-control':'max-age=0', 'upgrade-insecure-requests':'1', 'user-agent':'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36' } response = requests.get(url, headers=headers) parser = response.text soup = BeautifulSoup(parser, "html.parser") print(soup.text)