Skip to content
Snippets Groups Projects
Commit 2226a234 authored by Eliott Sammier's avatar Eliott Sammier
Browse files

Adapt page list parsing to Macao3

parent befe1e22
No related branches found
No related tags found
1 merge request!1Main
......@@ -46,6 +46,11 @@ def parse_mosetp(graph: Graph, filepath: str, id: str):
:param id: text identifier of the subsection
"""
# Prepare regex with capturing groups to match lines
if Context.version == "macao_3":
regex = re.compile(
r'.*new PageContenu\("(.*)", "(.*)", "(.*)", "", "", "", "(.*)"\);'
)
else:
regex = re.compile(r'.*new PageContenu\("(.*)", "(.*)", "(.*)", ""\);')
# The lines we need are fairly basic, grep is much faster
# than a Python HTML parser to filter them
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment