Skip to content

Commit

Permalink
Update utils.py
Browse files Browse the repository at this point in the history
  • Loading branch information
saidsurucu committed Jul 3, 2024
1 parent 1a3c098 commit 0f9a5a8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion yokatlas_py/utils.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
import json
from bs4 import BeautifulSoup
from urllib.parse import parse_qsl
from pkg_resources import resource_filename

def load_column_data():
with open("columnData.json", "r") as file:
json_path = resource_filename(__name__, 'columnData.json')
with open(json_path, 'r') as file:
column_data = json.load(file)
if isinstance(column_data, list) and len(column_data) > 0:
return dict(parse_qsl(column_data[0]))
return {}


def extract_text_from_html(html):
if not html:
return None
Expand Down

0 comments on commit 0f9a5a8

Please sign in to comment.