mirror of
https://github.com/kmein/niveum
synced 2026-03-16 18:21:07 +01:00
27 lines
580 B
Nix
27 lines
580 B
Nix
{
|
|
writeShellScriptBin,
|
|
wget,
|
|
curl,
|
|
jq,
|
|
}:
|
|
writeShellScriptBin "instaget" ''
|
|
for url in "$@"; do
|
|
json="$(${curl}/bin/curl -s "$url" \
|
|
| grep display_url \
|
|
| grep -o '{.*}')"
|
|
|
|
echo "$json"
|
|
| ${jq}/bin/jq -r '
|
|
.entry_data.PostPage
|
|
| .[].graphql.shortcode_media.edge_sidecar_to_children.edges
|
|
| .[].node.display_url' \
|
|
| xargs ${wget}/bin/wget
|
|
|
|
echo "$json"
|
|
| ${jq}/bin/jq -r '
|
|
.entry_data.PostPage
|
|
| .[].graphql.shortcode_media.display_url' \
|
|
| xargs ${wget}/bin/wget
|
|
done
|
|
''
|