刚接触 Huginn,想自制 rss 后全文输出,目前遇到同一网页,部分元素抓取正常,部分抓取结果为空。求教问题在哪里,感谢!!!
URL: http://www.cneb.gov.cn/guoneinews/
目的:抓取文章标题
抓取结果为空的代码:
{
"expected_update_period_in_days": "2",
"url": "http://www.cneb.gov.cn/guoneinews/",
"type": "html",
"mode": "on_change",
"extract": {
"title": {
"css": "#ullist > li:nth-child(1) > h2 > a",
"value": "string(.)"
}
}
}
运行结果:
同是该页面,正常抓取的代码
{
"expected_update_period_in_days": "2",
"url": "http://www.cneb.gov.cn/guoneinews/",
"type": "html",
"mode": "on_change",
"extract": {
"title": {
"css": "#SUBD1480918870891184 > div > div.yjxwgnejy_con01 > div.right > h2 > a",
"value": "string(.)"
}
}
}
运行结果: