我尝试使用下面的代码在此网页(https://www.meleenumerique.com/scientist_comite)上抓取人员的名字+姓氏,但它不起作用。我怎样才能确定它出了什么问题?
这是我写的代码
from lxml import html
import csv,os,json
import requests
url="https://www.meleenumerique.com/scientist_comite"
r=requests.get(url)
t=html.fromstring(r.content)
title=t.xpath('/html/head/title/text()')
#Create the list of speaker
speaker=t.xpath('//span[contains(@class,"speaker-name")]//text()')
print(title)
print("Speakers:",speaker)
Run Code Online (Sandbox Code Playgroud)