Skip to content

Commit

Permalink
Atualiza raspador para Macaé-RJ
Browse files Browse the repository at this point in the history
  • Loading branch information
trevineju committed Jan 9, 2025
1 parent a34ba6b commit d21231d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions data_collection/gazette/spiders/rj/rj_macae.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class RjMacaeSpider(BaseGazetteSpider):

def start_requests(self):
yield scrapy.FormRequest(
url="https://sistemas.macae.rj.gov.br:840/diariooficial/index/listarajax",
url="https://do.macae.rj.gov.br/index/listarajax",
method="POST",
formdata={
"periodode": self.start_date.strftime("%d/%m/%Y"),
Expand All @@ -26,10 +26,10 @@ def start_requests(self):
def parse(self, response):
for data in response.json()["data"]:
gazette_code = data["DT_RowId"]
gazette_url = f"https://sistemas.macae.rj.gov.br:840/diariooficial/index/download?id={gazette_code}"
gazette_url = f"https://do.macae.rj.gov.br/index/downloadanexo?idmodel={gazette_code}&campo=txarquivo"

gazette_edition = data["edicao"]
gazette_edition_number = re.search(r"\d+", gazette_edition).group(0)
gazette_edition_number = re.search(r"\d+", gazette_edition).group()

raw_gazette_date = re.search(
r"\d{2}\/\d{2}\/\d{4}", data["publicacao"]
Expand Down

0 comments on commit d21231d

Please sign in to comment.