Skip to content

Commit

Permalink
Melhora coleta de metadado usando regex
Browse files Browse the repository at this point in the history
Signed-off-by: Juliana Trevine <44185775+trevineju@users.noreply.github.com>
  • Loading branch information
trevineju committed Sep 25, 2024
1 parent d924ff2 commit f023d01
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion data_collection/gazette/spiders/rj/rj_macae.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ def parse(self, response):
gazette_edition = data["edicao"]
gazette_edition_number = re.search(r"\d+", gazette_edition).group(0)

raw_gazette_date = data["publicacao"][0:10]
raw_gazette_date = re.search(
r"\d{2}\/\d{2}\/\d{4}", data["publicacao"]
).group()
gazette_date = dt.strptime(raw_gazette_date, "%d/%m/%Y").date()

gazette_item = {
Expand Down

0 comments on commit f023d01

Please sign in to comment.