Skip to content
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

shot-scraper javascript -r/--raw option #95

Closed
simonw opened this issue Oct 15, 2022 · 2 comments
Closed

shot-scraper javascript -r/--raw option #95

simonw opened this issue Oct 15, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@simonw
Copy link
Owner

simonw commented Oct 15, 2022

For outputting a JSON string as the string itself, not "the string\nlike this".

Inspired by:

It would be nice to be able to do this without needing jq:

shot-scraper javascript datasette.io 'document.documentElement.outerHTML' | jq -r
@simonw simonw added the enhancement New feature or request label Oct 15, 2022
@simonw simonw closed this as completed in 2fecad3 Oct 15, 2022
@simonw
Copy link
Owner Author

simonw commented Oct 15, 2022

Example:

shot-scraper javascript https://datasette.io/ "document.title" -r

Returns this (with no trailing newline):

Datasette: An open source multi-tool for exploring and publishing data

simonw added a commit that referenced this issue Oct 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant