comments.cgi - gophercgis - Collection of gopher CGI/DCGI for geomyidae
(HTM) hg clone https://bitbucket.org/iamleot/gophercgis
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
comments.cgi
---
1 #!/bin/sh
2
3 . ../common/config.sh
4
5 CGI="${CGI_BASEDIR}/instagram/user.dcgi"
6
7
8 media="$2"
9
10
11 curl -Lgs "https://www.instagram.com/p/${media}/" |
12 sed -ne 's/;<\/script>$//' -e '/_sharedData =/s/^.*_sharedData = //p' |
13 jq -r '
14 .entry_data.PostPage[].graphql.shortcode_media |
15 .edge_media_to_comment | .edges[] |
16 ( "@\(.node.owner.username) writes:",
17 .node.text,
18 "" )
19 '