import requests
from bs4 import BeautifulSoup
url = 'https://bj.lianjia.com/ershoufang/'
headers = {'User-Agent':'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36'}
resp = requests.get(url,headers = headers)
html = resp.text
soup = BeautifulSoup(html,'html.parser') #
infos = soup.find('ul',{'class':'sellListContent'}).find_all('li')
for info in infos:
name = info.find('div',{'class':'title'}).find('a').get_text()
print(name)