It is probably simpler to implement it as a 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
       ---
 (DIR) changeset f4848a2cd89e7068686ee674ea69eae0df125966
 (DIR) parent d8817ed832ed48fa67e1d82ca1d53cae95854728
 (HTM) Author: Leonardo Taccari <iamleot@gmail.com>
       Date:   Mon, 20 Aug 2018 23:58:11 
       
       It is probably simpler to implement it as a CGI.
       
       Diffstat:
        instagram/comments.cgi |  20 ++++++++++++++++++++
        1 files changed, 20 insertions(+), 0 deletions(-)
       ---
       diff -r d8817ed832ed -r f4848a2cd89e instagram/comments.cgi
       --- /dev/null   Thu Jan 01 00:00:00 1970 +0000
       +++ b/instagram/comments.cgi    Mon Aug 20 23:58:11 2018 +0200
       @@ -0,0 +1,20 @@
       +#!/bin/sh
       +
       +CGI="/cgi/instagram/user.dcgi"
       +
       +
       +media="$2"
       +
       +
       +/usr/bin/ftp -V -o - "https://www.instagram.com/p/${media}/" |
       +sed -ne 's/;<\/script>$//' -e '/sharedData =/s/^.*sharedData = //p' |
       +/usr/pkg/bin/jq -r '
       +.entry_data.PostPage[].graphql.shortcode_media |
       +       .edge_media_to_comment | .edges[] |
       +               ( "[1|" + "@" +
       +                    ( .node.owner.username | gsub("\\|"; "\\|") ) + "|" +
       +                    "'"${CGI}?"'" + ( .node.owner.username | gsub("\\|"; "\\|") ) +
       +                    "|server|port]",
       +                 "t" + .node.text,
       +                 "t" )
       +'