-
Notifications
You must be signed in to change notification settings - Fork 262
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ability to execute different commands on multiple selectors #169
Comments
Please reply. It prevents the crawling of same site two times for two selectors |
Have you considered just dumping the output of
Much easier than waiting for a feature that will most likely never come, given that this project has outstanding PRs going back four years: https://github.com/ericchiang/pup/pulls |
Highly recommend xidel, support xpath selector |
curl site | tee >(pup a | command) >(pup td | command) |
Eg.
curl 'example.com' | pup 'a, td'
But if i need to reformat the output selectively using linux commands like sed awk tr etc.
curl example.com | pup 'a (command to execute on 'a' tags, td (command to execute on 'td' tags)
Just like tee and pee from moreutils of linux.
Pup will extract the multiple selector and pipe it to defined command. and finally pipe the formatted output of all selectors to stdout
The text was updated successfully, but these errors were encountered: