Avoid to match and substitute non-JSON lines - 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 3a6aad2e82fffb8f05dfb3dec7fc55faf4a40425
(DIR) parent fe8e195a09825c1d2905a88ee09518cae09151a4
(HTM) Author: Leonardo Taccari <iamleot@gmail.com>
Date: Wed, 13 Feb 2019 22:29:45
Avoid to match and substitute non-JSON lines
Diffstat:
instagram/user.dcgi | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff -r fe8e195a0982 -r 3a6aad2e82ff instagram/user.dcgi
--- a/instagram/user.dcgi Fri Jan 11 18:24:06 2019 +0100
+++ b/instagram/user.dcgi Wed Feb 13 22:29:45 2019 +0100
@@ -92,7 +92,8 @@
url="https://www.instagram.com/${user}/"
fetch_cmd() {
curl -Lgs -- "${url}" |
- sed -ne 's/;<\/script>$//' -e '/sharedData =/s/^.*sharedData = //p'
+ sed -ne 's/;<\/script>$//' \
+ -e '/_sharedData =/s/^.*_sharedData = //p'
}
fi