From bfc5adac709cbee2ee61e642f69d7b0088ed52df Mon Sep 17 00:00:00 2001 From: Yarne Coppens Date: Thu, 25 Jul 2024 19:58:28 +0200 Subject: [PATCH] Started work on bgg_connection module --- bgg_connection.py | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 bgg_connection.py diff --git a/bgg_connection.py b/bgg_connection.py new file mode 100644 index 0000000..2244d60 --- /dev/null +++ b/bgg_connection.py @@ -0,0 +1,8 @@ +import requests +import xml.etree.ElementTree as ET +from pydantic import HttpUrl + +def url_to_xml_object(url: HttpUrl) -> ET.Element: + r = requests.get(url) + root = ET.fromstring(r.content) + return root