Avoid to match and substitute non-JSON lines (like user.dcgi) - 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
---
(DIR) changeset 7d60365d6ec75e398efdf4f7b3dc044994e3cb20
(DIR) parent 42eb67a5078934d328255a9de21cb614cef4a71d
(HTM) Author: Leonardo Taccari <iamleot@gmail.com>
Date: Tue, 12 Mar 2019 23:46:25
Avoid to match and substitute non-JSON lines (like user.dcgi)
Diffstat:
instagram/comments.cgi | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff -r 42eb67a50789 -r 7d60365d6ec7 instagram/comments.cgi
--- a/instagram/comments.cgi Wed Mar 06 15:59:14 2019 +0100
+++ b/instagram/comments.cgi Tue Mar 12 23:46:25 2019 +0100
@@ -9,7 +9,7 @@
curl -Lgs "https://www.instagram.com/p/${media}/" |
-sed -ne 's/;<\/script>$//' -e '/sharedData =/s/^.*sharedData = //p' |
+sed -ne 's/;<\/script>$//' -e '/_sharedData =/s/^.*_sharedData = //p' |
jq -r '
.entry_data.PostPage[].graphql.shortcode_media |
.edge_media_to_comment | .edges[] |