diff options
-rw-r--r-- | cgi/post.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/cgi/post.py b/cgi/post.py index 2c14004..4d4c598 100644 --- a/cgi/post.py +++ b/cgi/post.py @@ -1242,19 +1242,19 @@ def discord_hook(post, url): "embeds": [{ "title": post['subject'], "description": cut_home_msg(post['message'], 30), - "url": "https://bienvenidoainternet.org" + url, + "url": "https://bienvenidoainternet.org" + url, # TODO: Parametrizar. "color": 11910504, "timestamp": datetime.datetime.utcfromtimestamp(post['timestamp']).isoformat(), "footer": { "text": board['name'] }, - "thumbnail": { "url": "https://bienvenidoainternet.org/%s/thumb/%s" % (board['dir'], post['thumb']) }, + "thumbnail": { "url": "%s%s/thumb/%s" % (Settings.HOME_URL, board['dir'], post['thumb']) }, "author": { "name": "Nuevo hilo", - "icon_url": "https://bienvenidoainternet.org/0/junk/w/shobon.gif" + "icon_url": "%s0/junk/w/shobon.gif" % Settings.HOME_URL }}] } jsondata = json.dumps(data, separators=(',',':')) opener = urllib2.build_opener() opener.addheaders = [('User-Agent', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:59.0) Gecko/20100101 Firefox/59.0')] - response = opener.open(WEBHOOK_URL, jsondata, 6) + response = opener.open(Settings.DISCORD_HOOK_URL, jsondata, 6) the_page = response.read() |