Skip to content

Commit

Permalink
fix(constants): improve matching with spaces & add debugging link
Browse files Browse the repository at this point in the history
  • Loading branch information
HarryVasanth committed Jan 4, 2024
1 parent b9dc3d0 commit 16defb4
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,8 @@
GASOLINE_98_TW = "Gasolina 98 "

# PDF_GAS_PRICE_REGEX = r'(?<=€ )([\d,]+)(?= por litro)'
PDF_GAS_PRICE_REGEX = r"(%s|%s|%s)(?:[\.€\w ]+)(\d{1},\d{3})" % (
"Gasolina super sem chumbo IO 95",
"Gasóleo rodoviário",
"Gasóleo colorido e marcado",
)
PDF_GAS_PRICE_REGEX = r"(Gasolina\s*super\s*sem\s*chumbo\s*IO\s*95|Gasóleo\s*rodoviário|Gasóleo\s*colorido\s*e\s*marcado)(?:[\.€\w ]+)(\d{1},\d{3})"


# History plot
HISTORY_PLOT_LABEL_GASOLINA_IO95 = "Gasolina IO95"
Expand All @@ -46,6 +43,10 @@
"Variação dos preços dos combustíveis na Madeira, de {start_date} a {end_date}."
)

# JORAM link 2023 - For Debugging
JORAM_LINK = "https://joram.madeira.gov.pt/joram/2serie/Ano%20de%202023"
JORAM_PDF_LINK = "https://joram.madeira.gov.pt/joram/2serie/Ano%20de%202023/{file}"

# JORAM link
JORAM_LINK = "https://joram.madeira.gov.pt/joram/2serie/Ano%20de%20{date:%Y}"
JORAM_PDF_LINK = "https://joram.madeira.gov.pt/joram/2serie/Ano%20de%20{date:%Y}/{file}"
#JORAM_LINK = "https://joram.madeira.gov.pt/joram/2serie/Ano%20de%20{date:%Y}"
#JORAM_PDF_LINK = "https://joram.madeira.gov.pt/joram/2serie/Ano%20de%20{date:%Y}/{file}"

0 comments on commit 16defb4

Please sign in to comment.