From 9322159d2a55804774075451ebadb988d7d6f257 Mon Sep 17 00:00:00 2001 From: Sarah Date: Fri, 18 Feb 2022 21:48:47 +0000 Subject: [PATCH] fix return --- WikiUtils.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/WikiUtils.py b/WikiUtils.py index 5ab5f41..e6ebdcc 100644 --- a/WikiUtils.py +++ b/WikiUtils.py @@ -1,5 +1,4 @@ import requests -from bs4 import BeautifulSoup def get_auth_header(token_id, token_secret): @@ -12,9 +11,4 @@ def get_page_export_html(page_id, wiki_url, token_id, token_secret): r = requests.get(wiki_url + "/api/pages/{}/export/html".format(page_id), headers=headers) - soup = BeautifulSoup(r.text, 'html.parser') - elements = soup.find("code").text.strip().split("\n") - headers = elements.pop(0).split(",") - viewings = [dict(zip(headers, row.split(","))) for row in elements] - - return viewings + return r.text