I use the following to extract two values using xidel -e
.
'//input[@name="qid"]/@value[1]'
"//span[@id='trueFinalResultCount']"
But I'd like to put the two results into a TSV format.
result1<TAB>result2
Could anybody show me how to combine the above two expressions? (I tried the following. But it doesn't work.)
'join((//input[@name="qid"]/@value[1], //span[@id='trueFinalResultCount'][1]), x:cps(9))'
string-join( ($x, $y), ' ') and replace ' ' with "tab-key pressed here"
example: xidel URL --xpath 'string-join((somepath1, somepath2)," ")'
it results into TSV
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.