Dear team,
I executed below query:
CALL apoc.load.html('myurl', {
href: 'body a.marki_blok'
})YIELD value
RETURN value
But result returns no href value, as below:
"href": [
{
"attributes": {
"href": "",
"title": "Abarth - Technical Specs, Fuel consumption, Dimensions",
"class": "marki_blok"
},
"text": "Abarth",
"tagName": "a"
},
Expected href value is: "/en/abarth-brand-200"
But with this query:
CALL apoc.load.html('Công nhân Pouyuen mất việc tìm kế mưu sinh - VnExpress', {
body: 'body article.fck_detail p a'
})YIELD value
RETURN value
it return perfect href value:
{
"body": [
{
"attributes": {
"rel": "dofollow",
"href": "vnexpress.net /cong-nhan-pou-yuen-mat-viec-nhan-ho-tro-cao-nhat-379-trieu-dong-4574611.html"
},
"text": "tiền hỗ trợ",
"tagName": "a"
}
]
}
Anyone please help how can I extract relative href with apoc?
Thanks in advance!