aboutsummaryrefslogtreecommitdiff
path: root/shared.py
diff options
context:
space:
mode:
Diffstat (limited to 'shared.py')
-rw-r--r--shared.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/shared.py b/shared.py
index 72db189..0eeee53 100644
--- a/shared.py
+++ b/shared.py
@@ -1,6 +1,7 @@
#!/bin/python3
import urllib.request
import re
+import os
from uuid import uuid4
from bs4 import BeautifulSoup
@@ -15,3 +16,9 @@ def read_file(filename):
r = str(f.read())
f.close()
return r
+
+def debug_output(name, data):
+ if not os.path.exists("./debug"): return
+ f = open(f"./{name}-api-response.json", "w+")
+ f.write(str(data, "utf-8"))
+ f.close()