Skip to content

Commit

Permalink
isort + remove docstring for build
Browse files Browse the repository at this point in the history
  • Loading branch information
TLaidler committed Oct 31, 2024
1 parent c7f4f99 commit ab7f8fc
Showing 1 changed file with 1 addition and 17 deletions.
18 changes: 1 addition & 17 deletions data_collection/gazette/spiders/am/am_associacao_municipios.py
Original file line number Diff line number Diff line change
@@ -1,23 +1,13 @@
# Importando bibliotecas padrão
import datetime as dt
from dateutil import rrule

# Importando bibliotecas de terceiros
import scrapy
from dateutil import rrule

# Importando módulos locais do projeto
from gazette.items import Gazette
from gazette.spiders.base import BaseGazetteSpider


class AmAssociacaoMunicipiosSpider(BaseGazetteSpider):
"""
Spider para coletar diários oficiais do município de Niterói-RJ.
A spider coleta arquivos PDF de diários oficiais no site do Diário Oficial de Niterói
e armazena informações como a data e o URL dos arquivos.
"""

TERRITORY_ID = "1300000"
name = "am_associacao_municipios"
allowed_domains = ["https://diariomunicipalaam.org.br/"]
Expand All @@ -26,9 +16,6 @@ class AmAssociacaoMunicipiosSpider(BaseGazetteSpider):
end_date = dt.date.today()

def start_requests(self):
"""
Gera as requests a partir da data inicial até a data final (hoje).
"""
for date in rrule.rrule(
rrule.DAILY, dtstart=self.start_date, until=self.end_date
):
Expand All @@ -42,9 +29,6 @@ def start_requests(self):
)

def parse_valid_gazette_file(self, response, gazette_date):
"""
Verifica se o arquivo existe e gera o item do diário oficial.
"""
if response.status == 200:
yield Gazette(
date=gazette_date,
Expand Down

0 comments on commit ab7f8fc

Please sign in to comment.