added config.json to make changing api base url easier

This commit is contained in:
Lynne 2018-10-14 16:58:58 +10:00
parent 2858e7c960
commit e4d661caa6
3 changed files with 17 additions and 13 deletions

View file

@ -4,15 +4,17 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
import mastodon
import os, random, re
import os, random, re, json
import create
from bs4 import BeautifulSoup
api_base_url = "https://botsin.space"
cfg = json.load(open('config.json', 'r'))
api_base_url = "https://knzk.me"
client = mastodon.Mastodon(
client_id="clientcred.secret",
access_token="usercred.secret",
api_base_url=api_base_url)
api_base_url=cfg['site'])
def extract_toot(toot):
#copied from main.py, see there for comments