From 17eab3ce6e40dc551f419223eeb232250f62355e Mon Sep 17 00:00:00 2001 From: Michael Murtaugh Date: Tue, 20 Dec 2022 14:46:21 +0100 Subject: [PATCH] terms from pad --- call.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/call.py b/call.py index 07aa93f..c63c7be 100755 --- a/call.py +++ b/call.py @@ -1,9 +1,17 @@ #!/usr/bin/env python3 import json, random, textwrap +import yaml +from urllib.request import urlopen -with open('terms.json', 'r') as f: - terms = json.load(f) + +# with open('terms.json', 'r') as f: +# terms = json.load(f) +# with open('terms.yaml', 'r') as f: +# terms = yaml.load(f) + +f = urlopen("https://pad.xpub.nl/p/XPUB-promo-terms/export/txt") +terms = yaml.load(f) def make_pub(): actor = random.choice(terms['actor'])