diff --git a/fetch.py b/fetch.py index fc282e0..43c148a 100644 --- a/fetch.py +++ b/fetch.py @@ -1,8 +1,14 @@ import requests +import json + +with open('config.json', 'r') as f: + config = json.load(f) def fetchQuote(quoteId): - quote = requests.get("https://quotes.everypizza.im/image/" + quoteId) + processedId = config['imag']['server'] + quoteId + quote = requests.get(processedId) if quote.status_code == 200: - return quote.content + # return quote.content + return else: return None