User Activity

  • Modified a comment on discussion Help on Xidel

    I'd like also to know if there are tutorials for unexperienced users like I am, I couldn't find any, except for some examples here and there... For Xidel stuff, see https://github.com/benibela/xidel/issues/67#issuecomment-770084663. For XPath/XQuery stuff, see https://github.com/benibela/xidel/issues/106#issuecomment-1627386429. An extensive wiki is still on my to-do-list.

  • Posted a comment on discussion Help on Xidel

    I'd like also to know if there are tutorials for unexperienced users like I am, I couldn't find any, except for some examples here and there... For Xidel stuff, see https://github.com/benibela/xidel/issues/67#issuecomment-770084663. For XPath/XQuery stuff, see https://github.com/benibela/xidel/issues/106#issuecomment-1627386429.

  • Posted a comment on discussion Help on Xidel

    Hello Virgus, Have you actually removed (or commented) @ECHO OFF to debug your script? The first extraction... %XIDEL% -s %SRCURL% -e "//a[@class='downloadLink']/@href" ...doesn't only extract the first "apk-release-url". It extracts... xidel -s "https://www.apkmirror.com/apk/teamviewer/teamviewer-host/"^ -e "count(//a[@class='downloadLink']/@href)" 50 ...of them. And because of the FOR-loop only the last one will be assigned to %DLHREF%. If you only want the first one, use -e "(//a[@class='downloadLink'])[1]/@href"....

  • Posted a comment on discussion Help on Xidel

    Hello Michael, sort() is for individual items, like sort(//div[@class='d-flex flex-column flex-md-row my-5 flex-justify-center']//@datetime) for instance. This won't work for sorting nodes. You'll have to use the XQuery "Order By Clause" in a FLWOR expression: xidel -s "https://github.com/Hibbiki/chromium-win32/releases" -e "for $x in //section order by $x//@datetime descending return $x/join((.//@datetime,h2),x:cps(9))" xidel -s "https://github.com/Hibbiki/chromium-win32/releases" -e ^"^ for $x...

  • Posted a comment on discussion Help on Xidel

    That's a creative way to assign the (prettified) extraction-query to a variable. The outer parenthesis ( ) aren't necessary btw. Alternatively you could of course insert the extraction-query directly (with the necessary escape-characters): FOR /F "delims=" %A IN (' xidel -s "%fil%" -e ^" vrs:^=//div[@class^='d-flex flex-column flex-md-row my-5 flex-justify-center']/join^( ^( ^(.//@datetime^)[1]^, normalize-space^(.//span[@class^='ml-1 wb-break-all']^)^, div[@class^='col-md-9']//h1 ^)^,x:cps^(9^)...

  • Posted a comment on discussion Help on Xidel

    Reino, nice to meet you again ... Wish I could say "likewise", but with you being anonymous that's not so obvious to me. --extract "vrs:=($cls)//normalize-space(span[@class = 'ml-1 wb-break-all'])" That would be... --extract "vrs:=normalize-space($cls//span[@class='ml-1 wb-break-all'])" or... --extract "vrs:=$cls/normalize-space(.//span[@class='ml-1 wb-break-all'])" I'd forget about the use of external variables if I were you, because that's something very difficult to accomplish in cmd, if possible...

  • Posted a comment on discussion Help on Xidel

    All these are arrays. Sequences. I get everything - syntax error, endless loop and a string of all entries - but no array of normalized entries. What exactly have you tried? And what is the end-result you're actually looking for?

  • Posted a comment on discussion Help on Xidel

    No problem. One last thing I forgot to mention: substring-before(@id,'_link') is another option instead of extract(@onclick,'\"(.*)\"',1). Probably easier because there are no double-quotes to deal with.

View All

Personal Data

Username:
corone17
Joined:
2005-04-25 15:50:42

Projects

  • No projects to display.

Personal Tools