You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wanted to use pup to mass download some files from a site, and it did a very good job of parsing the HTML. But then I had to pipe the results into a bash loop – it would be nice to have this built in with an --exec type flag, in a similar vein to how the find command works. Could have a different name, that's just my initial suggestion.
So, instead of this implementation:
curl http://www.mysite.com | pup 'a attr{href}' | while read i; do wget $i; done
You could have:
curl http://www.mysite.com | pup 'a attr{href}' --exec wget {} \;
Does that sound like a valid idea?
Thanks!
The text was updated successfully, but these errors were encountered:
I wanted to use pup to mass download some files from a site, and it did a very good job of parsing the HTML. But then I had to pipe the results into a bash loop – it would be nice to have this built in with an
--exec
type flag, in a similar vein to how thefind
command works. Could have a different name, that's just my initial suggestion.So, instead of this implementation:
curl http://www.mysite.com | pup 'a attr{href}' | while read i; do wget $i; done
You could have:
curl http://www.mysite.com | pup 'a attr{href}' --exec wget {} \;
Does that sound like a valid idea?
Thanks!
The text was updated successfully, but these errors were encountered: