Comments (5)
Forgot to mention I will be happy to provide a PR.
from dynamic-metalink-resource.
Hi - happy to hear this resource has been helpful for you! I know what you mean about parsing HTML pages – it's no fun. The pup
option sounds vaguely familiar; I think I checked it out a few years ago. I like the concept. Having checked it out again this afternoon, it doesn't seem like it is still maintained (e.g. many issues pending feedback, the latest release segfaulted for me, no recent commits).
Before trying to support it in this resource, do you have thoughts about:
- What are some other alternatives to
pup
? Are they more maintained? - Have you tested and verified using
pup
for the use cases you'll want it for? Is it more practical thangrep
/sed
? - If you're asking about public HTML/server/assets and willing to share concrete case(s), I'd be happy to help brainstorm if there might be alternative, creative ways to scrape and automate.
Thanks!
from dynamic-metalink-resource.
Hello, you make very fair points and I understand your hesitation. I too noticed that unfortunately pup
is unmaintained and I just assumed it would work for my case. I will come back with an answer to your questions.
from dynamic-metalink-resource.
Ok, I did an investigation. Here is what I found:
- no reasonable alternatives to
pup
- maybe the segfault you mentioned is because you are on macOS and followed the brew instructions in the README? They are known to be buggy, a simpler
brew install pup
gives a perfectly working executable, I tested it. See ericchiang/pup#116 - I tested and verified for my use case. The URL is public so you can have a look if you want. To get a semver string, I can simplify from
curl -s https://veertu.com/download-anka-build |
grep -E -o 'download-link-cell">[^>]*</div>' |
grep -E 'Controller.*Linux' -A 1 |
grep -Eoi ">Ver \d+\.\d+\.\d+<" |
grep -Eoi "\d+\.\d+\.\d+"
1.1.0
to
curl -s https://veertu.com/download-anka-build |
pup ':contains("Anka Controller") + .download-link-cell text{}' |
grep -Eoi "\d+\.\d+\.\d+"
1.1.0
So from my point of view, although not maintained any more, the latest release v0.4.0 of pup from github is quite stable. Also, adding pup
to the image doesn't make the resource less robust, it depends whether pup
is used or not, and even if it is used my (limited) tests show that it is working fine. What do you think?
from dynamic-metalink-resource.
Hello @dpb587, did you have any chance to look at my reply above?
from dynamic-metalink-resource.
Related Issues (1)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dynamic-metalink-resource.