Scrapy返回空数组

时间:2016-11-13 06:33:28

标签: python xpath css-selectors scrapy scrapy-spider

我想使用Scrapy进行抓取。所以我为xpath或css选择器打开firefox或chrome来复制这个地址!我明白了!但这回归空!我在网站(检查元素)和response.body中使用jquery尝试此操作。它们都是一样但不起作用!例如,我的抓取页面是this 和地址是:

IN INSPECT ELEMENT:
{
FIREFOX CSS:
html body table tbody tr td div table tbody tr td center table tbody tr td table tbody tr td table.borderact tbody tr td h1
FIREFOX XPATH:
/html/body/table/tbody/tr/td/div/table[1]/tbody/tr/td[3]/center/table/tbody/tr/td[3]/table[1]/tbody/tr/td[2]/table/tbody/tr[1]/td/h1

CHROME CSS: 
body > table > tbody > tr > td > div > table:nth-child(3) > tbody > tr > td:nth-child(3) > center > table > tbody > tr > td:nth-child(3) > table:nth-child(1) > tbody > tr > td:nth-child(2) > table > tbody > tr:nth-child(1) > td > h1


IN RESPONSE:

FIREFOX CSS:
html body table tbody tr td div table tbody tr td center table tbody tr td table tbody tr td table.\"borderact\" tbody tr td h1
FIREFOX XPATH:
/html/body/table/tbody/tr/td/div/table[1]/tbody/tr/td[3]/center/table/tbody/tr/td[3]/table[1]/tbody/tr/td[2]/table/tbody/tr[1]/td/h1
 CHROME CSS: 
 body > table > tbody > tr > td > div > table:nth-child(3) > tbody > tr > td:nth-child(3) > center > table > tbody > tr > td:nth-child(3) > table:nth-child(1) > tbody > tr > td:nth-child(2) > table > tbody > tr:nth-child(1) > td > h1
}

0 个答案:

没有答案