Update instagram extractor after rhx_gis removal - 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 37cef42e5b3cefab3ca9f64691ca5198831cde43
 (DIR) parent 2707ddb96f71a429799251acdfc7ce1800e5aecd
 (HTM) Author: Leonardo Taccari <iamleot@gmail.com>
       Date:   Fri, 17 May 2019 17:40:39 
       
       Update instagram extractor after rhx_gis removal
       
       Diffstat:
        instagram/tags.dcgi |  14 ++++++--------
        instagram/user.dcgi |  14 ++++++--------
        2 files changed, 12 insertions(+), 16 deletions(-)
       ---
       diff -r 2707ddb96f71 -r 37cef42e5b3c instagram/tags.dcgi
       --- a/instagram/tags.dcgi       Sat Mar 23 21:00:47 2019 +0100
       +++ b/instagram/tags.dcgi       Fri May 17 17:40:39 2019 +0200
       @@ -7,14 +7,13 @@
        
        
        case "$2" in
       -*/*/*/*)
       -       # tag, id, rhx_gis and end_cursor are provided (next pages) (`data')
       +*/*/*)
       +       # tag, id and end_cursor are provided (next pages) (`data')
               IFS=/ set -- "$2"
               set -- $*
               tag="$1"
               id="$2"
       -       rhx_gis="$3"
       -       end_cursor="$4"
       +       end_cursor="$3"
               ;;
        *)
               # only tag is provided (first page) (`profile')
       @@ -42,7 +41,6 @@
        if .entry_data.TagPage[].graphql.hashtag.edge_hashtag_to_media.page_info.has_next_page then
          "[1|>> Next page|'"${CGI}?${tag}/"'" +
            .entry_data.TagPage[].graphql.hashtag.id + "/" +
       -    .rhx_gis + "/" +
            .entry_data.TagPage[].graphql.hashtag.edge_hashtag_to_media.page_info.end_cursor +
            "|server|port]"
        else
       @@ -53,7 +51,7 @@
        data_footer='
        ,
        if .data.hashtag.edge_hashtag_to_media.page_info.has_next_page then
       -  "[1|>> Next page|'"${CGI}?${tag}/${id}/${rhx_gis}/"'" +
       +  "[1|>> Next page|'"${CGI}?${tag}/${id}/"'" +
             .data.hashtag.edge_hashtag_to_media.page_info.end_cursor +
            "|server|port]"
        else
       @@ -62,7 +60,7 @@
        '
        
        
       -if [ "${rhx_gis}" ] && [ "${end_cursor}" ]; then
       +if [ "${end_cursor}" ]; then
               header="${data_header}"
               footer="${data_footer}"
               variables='{"tag_name":"'"${tag}"'","first":12,"after":"'"${end_cursor}"'"}'
       @@ -72,7 +70,7 @@
               # XXX: This was described in:
               # XXX:  <https://stackoverflow.com/questions/49786980/>
               #
       -       gis=$(printf "%s" "${rhx_gis}:${variables}" | md5 -q)
       +       gis=$(printf "%s" "${variables}" | md5 -q)
        
               fetch_cmd() {
                       curl -H "X-Instagram-GIS: ${gis}" -Lgs -- "${url}"
       diff -r 2707ddb96f71 -r 37cef42e5b3c instagram/user.dcgi
       --- a/instagram/user.dcgi       Sat Mar 23 21:00:47 2019 +0100
       +++ b/instagram/user.dcgi       Fri May 17 17:40:39 2019 +0200
       @@ -7,14 +7,13 @@
        
        
        case "$2" in
       -*/*/*/*)
       -       # user, id, rhx_gis and end_cursor are provided (next pages) (`data')
       +*/*/*)
       +       # user, id and end_cursor are provided (next pages) (`data')
               IFS=/ set -- "$2"
               set -- $*
               user="$1"
               id="$2"
       -       rhx_gis="$3"
       -       end_cursor="$4"
       +       end_cursor="$3"
               ;;
        *)
               # only user is provided (first (AKA profile) page) (`profile')
       @@ -51,7 +50,6 @@
        if .entry_data.ProfilePage[].graphql.user.edge_owner_to_timeline_media.page_info.has_next_page then
          "[1|>> Next page|'"${CGI}?${user}/"'" +
            .entry_data.ProfilePage[].graphql.user.id + "/" +
       -    .rhx_gis + "/" +
            .entry_data.ProfilePage[].graphql.user.edge_owner_to_timeline_media.page_info.end_cursor +
            "|server|port]"
        else
       @@ -62,7 +60,7 @@
        data_footer='
        ,
        if .data.user.edge_owner_to_timeline_media.page_info.has_next_page then
       -  "[1|>> Next page|'"${CGI}?${user}/${id}/${rhx_gis}/"'" +
       +  "[1|>> Next page|'"${CGI}?${user}/${id}/"'" +
             .data.user.edge_owner_to_timeline_media.page_info.end_cursor +
            "|server|port]"
        else
       @@ -71,7 +69,7 @@
        '
        
        
       -if [ "${rhx_gis}" ] && [ "${end_cursor}" ]; then
       +if [ "${end_cursor}" ]; then
               header="${data_header}"
               footer="${data_footer}"
               variables='{"id":"'"${id}"'","first":12,"after":"'"${end_cursor}"'"}'
       @@ -81,7 +79,7 @@
               # XXX: This was described in:
               # XXX:  <https://stackoverflow.com/questions/49786980/>
               #
       -       gis=$(printf "%s" "${rhx_gis}:${variables}" | md5 -q)
       +       gis=$(printf "%s" "${variables}" | md5 -q)
        
               fetch_cmd() {
                       curl -H "X-Instagram-GIS: ${gis}" -Lgs -- "${url}"