#!encoding=utf-8 from lxml import etree from selenium import webdriver from selenium.webdriver.chrome.options import Options options = Options() No_Image_loading = {"profile.managed_default_content_settings.images": 2} options.add_experimental_option("prefs", No_Image_loading) browser = webdriver.Chrome(options=options) browser.get("http://www.taobao.com") content = browser.page_source html = etree.HTML(content) title = html.xpath('//div[@class="ui blue segment"]/div[2]/text()') print(title)