jSoupLink
jSoupLink copied to clipboard
`:containsData` don't work
As your link point:
I find some available Selector APIs. But why this code will report error:
obj = Import["https://stackexchange.com", "HTMLDOM"];
obj["Select", ":containsData(fkey)"]
Hi. What is the error message? The copy of the library in jsoupLink hasn't been updated for some time and it's possible that they have introduced new features since then. This is one possibility.
This is the error message:
It's a wonderful library, but unfortunately, not many users seem to know it exists
It's likely that it was introduced in a later version of Jsoup, so Jsoup has to be updated for this to work.
@Juddd and @cekdahl, I took the liberty of forking jsoupLink (felixkasza/jsoupLink) and updating the jar file to 1.17.2; this works just fine now:
obj = Import["https://stackexchange.com", "HTMLDOM"];
obj["Select", ":containsData(fkey)"]
(I also updated the file structure and the PacletInfo to current (v12.3+) Mathematica standards.)
@felixkasza This looks really good. As it happens, I am actually about to release the first new version of jsoupLink in years, and this looks like it could help.
@cekdahl That'll be my first PR ever, then (yay?). And thanks, by the way, for jsoupLink in the first place. I love it!
@felixkasza I will upload my updates in the coming days, then you can make PR on top of that. I am currently taking the steps necessary to submit the package to WR's package repository.
Excellent, thanks! I'll cancel the current PR.
@felixkasza I have the updates I intended to make on a branch (some updates to e.g. the README still to come): https://github.com/cekdahl/jSoupLink/tree/feature/rel1.1
I'm using the jsoupLink.nb to build it. CreatePacletArchive@"jsoupLink"
creates the paclet file, but when I run PacletInstall[%, "IgnoreVersion" -> True]
then it prints the following error message:
Your branch had a lot of information about building the paclet in it. Do you see what's wrong?
Let me grab that branch and have a look.
Edited because Github's mail-to-comment conversion sucks.
OK, the underlying issue is the use of the PackPacklet[]
function (as opposed to the newer PacletTools
stuff); PackPaclet[]
does not do the current style of documentation (and the way PackPacklet[]
wants it is undocumented, AFAIK).
I took the liberty of bringing everything up to the current (MMA 12.3+) rules expectations and adding a new build script and manual build instructions; the PR is in #8. Conversely, I would retire the current jsoupLink.nb
.
Thank you for the fast response. I didn't have time today, but I'll try to have a look at it tomorrow.