Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] main from okfn-brasil:main #76

Open
wants to merge 123 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
123 commits
Select commit Hold shift + click to select a range
ba305c7
new spider sp_cacapava
almeidadm Feb 3, 2024
82e6242
Altera local.env para .local.env pois é dotfile
ogecece Mar 20, 2024
038b32b
Atualiza raspador para Macatuba-SP
trevineju Mar 10, 2024
8becf96
[novo spider] Macatuba - SP (#1118)
trevineju Mar 20, 2024
b6d4a7d
Add raspador para Campo Alegre de Lourdes - BA
ddevdan Mar 20, 2024
e78f2dc
Implementa base SAI e 5 municípios
victorfernandesraton Oct 3, 2023
25d0118
Adiciona 4 municípios SAI e corrige bugs
ogecece Mar 20, 2024
284d70f
Raspadores de SAI - Eatapa 1 (#956)
ogecece Mar 20, 2024
569c995
new spider sp_cunha
almeidadm Feb 4, 2024
2f19142
new spider Cunha/SP (#1077)
trevineju Mar 22, 2024
730c4c0
[new spider] Campo Alegre de Lourdes - BA (#1119)
trevineju Mar 22, 2024
ed562a7
Atualiza docs locais para configuração do projeto em Windows
Luisa-Coelho Oct 17, 2023
add2e31
Melhorias de documentação #881 (#981)
trevineju Mar 26, 2024
2265149
Adiciona link para as metas no guia de contribuição, resolve #499
Feb 25, 2024
ab728a8
Adiciona link para as metas no CONTRIBUTING.md (Issue #499) (#1080)
trevineju Mar 26, 2024
a8e4cb6
Adiciona checklist em pt-br e em en
claromes Sep 12, 2023
fbf8f3c
Atualiza seção sobre revisão de raspadores na documentação
trevineju Mar 26, 2024
d8f8d8d
Adiciona etapa de code review na documentação (#928)
trevineju Mar 26, 2024
497e71d
Atualiza documentações (PR template, contributing, links)
trevineju Mar 26, 2024
2c581b8
Adiciona template para raspadores
trevineju Mar 26, 2024
4e43007
Atualiza documentações do repositório (#1120)
trevineju Mar 26, 2024
0691e9e
Add new base spider type: DionetGazetteSpider
ayharano Dec 18, 2022
35fae5e
Refactor rj_rio_de_janeiro to inherit from DionetGazetteSpider
ayharano Dec 18, 2022
db9a39d
Refactor es_serra to inherit from DionetGazetteSpider
ayharano Dec 18, 2022
20b2f5e
Refactor es_associacao_municipios to inherit from DionetGazetteSpider
ayharano Dec 18, 2022
c3791e6
Add Corumbá-MS spider
ayharano Dec 18, 2022
61d593b
Melhora a abstração da classe base dionet
trevineju Mar 27, 2024
d49e98b
Atualiza spider para São José dos Campos -SP
trevineju Mar 27, 2024
9a24a08
Adiciona spider para Jaru-RO
trevineju Mar 27, 2024
e581f0d
Refatoração para o uso de um spider base para DIONET (#745)
trevineju Mar 27, 2024
81c042d
[Novo spider base]: diariooficialbr
Dec 27, 2023
13ceeeb
Corrige nome de classe e melhora parse
ogecece Mar 27, 2024
0ef463a
[Novo spider base]: diariooficialbr (#1065)
ogecece Mar 27, 2024
79985c9
Ajusta spiders para Maceió-AL, Tocantinia-TO e Jaru-RO
trevineju Mar 27, 2024
c6947f5
Ajusta spiders para Maceió-AL, Tocantinia-TO e Jaru-RO (#1122)
trevineju Mar 27, 2024
d8126df
Uberlândia-MG spider
rennerocha Sep 6, 2022
46342f6
Move spider de Uberlândia para diretório MG
trevineju Apr 16, 2024
2b1d8f5
Adiciona w3lib ao requirements.in
trevineju Apr 16, 2024
a6e515a
Uberlândia-MG spider (#638)
trevineju Apr 16, 2024
07dc76c
Habilita Proxy para Uberlândia-MG
trevineju Apr 16, 2024
8b2f1cf
Habilita Proxy para Uberlândia-MG (#1128)
trevineju Apr 16, 2024
d0ad000
fix: Atualiza raspador de Uberlândia-MG
trevineju Apr 17, 2024
73035aa
Atualiza raspador de Uberlândia-MG (#1129)
trevineju Apr 17, 2024
f7fe489
Adiciona proxy em mg_uberlandia.py
trevineju Apr 18, 2024
839d3d6
Adiciona proxy em mg_uberlandia.py (#1130)
trevineju Apr 18, 2024
6f8539e
Algumas melhorias para simplificar o raspador
rennerocha Apr 19, 2024
19b79e8
new spider Caçapava/SP (#1076)
rennerocha Apr 19, 2024
ef046fa
Fiz lint problem
rennerocha Apr 19, 2024
c67e924
pb_joao_pessoa: Pequena correção para restringir pela data final (end…
valeriow Jun 20, 2023
d5200ba
Simplifica paginação e verificação de datas em JP
ogecece Apr 24, 2024
a5f4fff
pb_joao_pessoa: Pequena correção para restringir pela data final (end…
ogecece Apr 24, 2024
d91005c
Corrige TERRITORY_ID de ba_maragogipe
ogecece May 7, 2024
368c026
Add rs_sao_francisco_de_paula spider
ddevdan May 8, 2024
55a6201
Add rs_sao_francisco_de_paula spider (#1140)
trevineju May 8, 2024
2d9fbac
add: raspadores para Marau-RS, Santa Clara do Sul-RS, Três Arroios-RS
trevineju May 8, 2024
5bcff6b
add: raspadores para Marau-RS, Santa Clara do Sul-RS, Três Arroios-RS…
trevineju May 8, 2024
e572c60
Remove classe base FECAM e todos os municípios derivados
trevineju May 16, 2024
87bb0f7
Remove classe base FECAM e todos os municípios derivados (#1144)
trevineju May 16, 2024
9155f9a
Adiciona spider base e municipios do sistema replicável Atende
AlexJBSilva Nov 29, 2023
f3e2c2b
Separa padrão atende em dois arquivos e propaga ajustes nos raspadore…
trevineju May 15, 2024
b37da6c
fix: revisões em sistema atende Layout 2
trevineju May 16, 2024
0edf4a4
Adiciona novo spider base ATENDE e alguns de seus municípios (#1145)
trevineju May 16, 2024
6196bb8
change dosp
Winzen Jun 19, 2023
b3d6d25
Corrige Uberaba (MG) para novo DOSP
ogecece May 8, 2024
23f9806
Melhora o desempenho da coleta para Sistema Replicavel DOSP (#888)
trevineju May 22, 2024
4fcaaec
Adiciona Smart Proxy para Manaus-AM
trevineju May 29, 2024
e67c439
Adiciona Smart Proxy para Manaus-AM (#1150)
trevineju May 29, 2024
7e3849d
Corrige modificação do banco em atualização de raspadores
ogecece May 29, 2024
29b69e7
Corrige modificação do banco em atualização de raspadores (#1151)
ogecece May 29, 2024
218e838
Modifica classe DOEM para fazer requisições por mês
trevineju May 31, 2024
2b3a163
Atualiza start_date de raspadores DOEM
trevineju May 31, 2024
0638df7
Adiciona raspador para Ipiranga-PR e padroniza demais raspadores DOEM
trevineju May 31, 2024
b42efda
Reduz o start_date de raspadores com série histórica interrompida
trevineju Jun 1, 2024
f4e0dcd
Modifica spider DOEM para coletar mais diários (#1041) (#1152)
trevineju Jun 1, 2024
f4d851b
Adiciona spider base para o sistema aDiarios (#870)
Jefersonalves Jun 19, 2023
21ea6ae
Adiciona Caucaia-CE, Buriticupi-MA, Itapecuru Mirim-MA, Juazeiro do N…
Jefersonalves Jun 19, 2023
d36a261
Adiciona spider base para adiarios v1 (#885)
trevineju Jun 3, 2024
7b3139c
Adiciona base adiarios versão 2 e municípios derivados
trevineju May 30, 2024
e60833f
Adiciona spider para adiarios v2 (#1154)
trevineju Jun 4, 2024
b1975e7
Adiciona a extensão correspondente no arquivo que
AlexJBSilva Nov 30, 2023
71f90b7
Adiciona a biblioteca 'filetype' nos 'requirements' do Querido Diário.
AlexJBSilva Nov 30, 2023
589029d
Simplifica definição de extensão de arquivo baixado
rennerocha Jun 2, 2024
7da36d4
Simplifica definição de extensão de arquivo baixado (#1153)
ogecece Jun 5, 2024
6720b18
adicionando raspadores para abare, adustina, almadina, anage e andorinha
cassiasamp Apr 25, 2024
d761bb0
Adiciona spiders para Abaré, Adustina, Almadina, Anagé e Andorinha (#…
trevineju Jun 12, 2024
ab5c862
Consolida padrão ADIARIOS
trevineju Jun 10, 2024
b1c8b7d
Consolida padrão ADIARIOS v2
trevineju Jun 10, 2024
ae8ce8e
Consolida padrão ATENDE v2
trevineju Jun 10, 2024
5f2dbd2
Consolida padrão DIARIOOFICIALBR
trevineju Jun 10, 2024
734736c
Consolida padrão DOSP
trevineju Jun 10, 2024
5cd61a1
Consolida padrão INSTAR
trevineju Jun 10, 2024
d4e3430
Consolida padrão de MUNICIPIOONLINE
trevineju Jun 10, 2024
1d93cee
Consolida padrão SAI
trevineju Jun 10, 2024
fd9ba12
Padroniza o layout de raspadores para municípios replicados sem modif…
trevineju Jun 12, 2024
d021c05
Atualiza import em 3 arquivos
trevineju Jun 12, 2024
0c818b4
Atualiza import em 3 arquivos (#1160)
trevineju Jun 12, 2024
e2234f1
Atualiza formato de url para base Instar
trevineju Jun 12, 2024
640a3e8
Atualiza formato de url para base Instar (#1161)
trevineju Jun 12, 2024
0ab79e3
Adiciona 3 novos raspadores de Minas Gerais
lucioerlan Dec 13, 2023
28b4b78
Adiciona spiders de MG: Carmo do Rio Claro, Onça do Pitangui e Juatub…
trevineju Jun 12, 2024
b6f355f
Atualiza raspador de Paulínia-SP para site novo
trevineju Jun 10, 2024
565ea52
Adiciona versão atual de Pau dos Ferros-RN
trevineju Jun 10, 2024
b4d351f
Atualiza raspadores para Pau dos Ferros-RN e Paulínia-SP (#1159)
trevineju Jun 12, 2024
0d74c3b
Habilita proxy para João Pessoa-PB
trevineju Jun 14, 2024
3c521fa
Habilita proxy para João Pessoa-PB (#1168)
trevineju Jun 14, 2024
ec5efda
Corrige filtro por data de DOEM
trevineju Jun 14, 2024
2760d3d
Corrige filtro por data de DOEM (#1169)
trevineju Jun 15, 2024
bd4022d
Atualiza raspador para Sumaré-SP
trevineju Jun 14, 2024
9c40058
Atualiza raspador para Sumaré-SP (#1170)
trevineju Jun 15, 2024
9317790
Habilita proxy em Afonso Cunha-MA
trevineju Jun 19, 2024
be1b60d
Habilita proxy em Afonso Cunha-MA (#1177)
trevineju Jun 19, 2024
8246d8c
Habilita proxy em raspadores do Maranhão
trevineju Jun 19, 2024
a316b00
Habilita proxy em raspadores do Maranhão (#1178)
trevineju Jun 19, 2024
9569936
Atualiza raspador para Santa Luzia-BA
trevineju Jun 19, 2024
4cc37ec
Atualiza raspador para Dirce Reis-SP
trevineju Jun 19, 2024
67e12d2
Atualiza Santa Luzia-BA e Dirce Reis-SP (#1179)
trevineju Jun 19, 2024
d16b0a2
Atualiza raspador para Mossoró-RN
trevineju Jun 19, 2024
7634797
Atualiza raspador para Mossoró-RN (#1180)
trevineju Jun 19, 2024
a6a0e4b
Atualiza referência para o CoC
trevineju Jun 20, 2024
77b7ab7
Troca referencias do repo de comunidade para docs.queridodiario
trevineju Jun 21, 2024
16c7e49
Atualiza URLs da documentação local para apontar para a documentação …
trevineju Jun 21, 2024
9295094
Ajusta TERRITORY_ID para Onça de Pitangui
trevineju Jun 25, 2024
723f233
Atualiza raspador de Onça de Pitangui-MG (#1183)
trevineju Jun 25, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
11 changes: 2 additions & 9 deletions .github/ISSUE_TEMPLATE/revisao_retroativa.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Revisão retroativa
description: Dar manutenção em código legado de raspadores no repositório
title: "[Revisão retroativa]: Raspador de <MUNICÍPIO-UF>"
title: "[Revisão retroativa]: <MUNICÍPIO-UF>"
labels: ["refactor"]
body:
- type: dropdown
Expand All @@ -10,7 +10,7 @@ body:
description: Selecione a opção abaixo
multiple: false
options:
- Neste repositório, há muitos códigos de raspadores que foram desenvolvidos no começo do projeto e não estão sendo usados. Para passar a usar o raspador deste município, é necessário testar para verificar se segue funcionando e revisá-lo caso não esteja.
- Neste repositório, há muitos códigos de raspadores que foram desenvolvidos no começo do projeto e não estão sendo usados. Para passar a usar o raspador deste município, é necessário testar para verificar se segue funcionando e revisá-lo caso não esteja. Consulte a <a href='https://docs.queridodiario.ok.org.br/pt-br/latest/contribuindo/raspadores.html'>documentação</a> para te ajudar.
validations:
required: true
- type: input
Expand Down Expand Up @@ -39,10 +39,3 @@ body:
placeholder: ex. mês/ano até atualmente; de 2016 à 2020
validations:
required: true
- type: textarea
id: test-list
attributes:
label: Lista de testes
description: "Utilize a lista a seguir de referência para teste. O raspador precisa atender todos os itens para estar pronto para ser usado. \n 1. [ ] Você executou uma extração completa do spider localmente e os dados retornados estavam corretos.\n 2. [ ] Você executou uma extração por período (start_date e end_date definidos) ao menos uma vez e os dados retornados estavam corretos. \n 3. [ ] Você verificou que não existe nenhum erro nos logs (log/ERROR igual a zero).\n 4. [ ] Você definiu o atributo de classe start_date no seu spider com a data do Diário Oficial mais antigo disponível na página da cidade.\n 5. [ ] Você garantiu que todos os campos que poderiam ser extraídos foram extraídos <a href='https://docs.queridodiario.ok.org.br/pt-br/latest/escrevendo-um-novo-spider.html#definicao-de-campos'>de acordo com a documentação</a>. \n \n Por favor, inclua qualquer informação relevante para o desenvolvimento."
validations:
required: false
33 changes: 24 additions & 9 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,27 @@
**AO ABRIR** um Pull Request de um novo raspador (spider), marque com um `X` cada um dos items do checklist
abaixo. **NÃO ABRA** um novo Pull Request antes de completar todos os items abaixo.

#### Checklist - Novo spider
- [ ] Você executou uma extração completa do spider localmente e os dados retornados estavam corretos.
- [ ] Você executou uma extração por período (`start_date` e `end_date` definidos) ao menos uma vez e os dados retornados estavam corretos.
- [ ] Você verificou que não existe nenhum erro nos logs (`log_count/ERROR` igual a zero).
- [ ] Você definiu o atributo de classe `start_date` no seu spider com a data do Diário Oficial mais antigo disponível na página da cidade.
- [ ] Você garantiu que todos os campos que poderiam ser extraídos foram extraídos [de acordo com a documentação](https://docs.queridodiario.ok.org.br/pt-br/latest/escrevendo-um-novo-spider.html#definicao-de-campos).
**AO ABRIR** uma *Pull Request* de um novo raspador (*spider*), marque com um `X` cada um dos items da checklist abaixo. Caso algum item não seja marcado, JUSTIFIQUE o motivo.

#### Layout do site publicador de diários oficiais
Marque apenas um dos itens a seguir:
- [ ] O *layout* não se parece com nenhum caso [da lista de *layouts* padrão](https://docs.queridodiario.ok.org.br/pt-br/latest/contribuindo/lista-sistemas-replicaveis.html)
- [ ] É um *layout* padrão e esta PR adiciona a spider base do padrão ao projeto junto com alguns municípios que fazem parte do padrão.
- [ ] É um *layout* padrão e todos os municípios adicionados usam a [classe de spider base](https://github.com/okfn-brasil/querido-diario/tree/main/data_collection/gazette/spiders/base) adequada para o padrão.

#### Código da(s) spider(s)
- [ ] O(s) raspador(es) adicionado(s) tem os [atributos de classe exigidos](https://docs.queridodiario.ok.org.br/pt-br/latest/contribuindo/raspadores.html#UFMunicipioSpider).
- [ ] O(s) raspador(es) adicionado(s) cria(m) objetos do tipo Gazette coletando todos [os metadados necessários](https://docs.queridodiario.ok.org.br/pt-br/latest/contribuindo/raspadores.html#Gazette).
- [ ] O atributo de classe [start_date](https://docs.queridodiario.ok.org.br/pt-br/latest/contribuindo/raspadores.html#UFMunicipioSpider.start_date) foi preenchido com a data da edição de diário oficial mais antiga disponível no site.
- [ ] Explicitar o atributo de classe [end_date](https://docs.queridodiario.ok.org.br/pt-br/latest/contribuindo/raspadores.html#UFMunicipioSpider.end_date) não se fez necessário.
- [ ] Não utilizo `custom_settings` em meu raspador.

#### Testes
- [ ] Uma coleta-teste **da última edição** foi feita. O arquivo de `.log` deste teste está anexado na PR.
- [ ] Uma coleta-teste **por intervalo arbitrário** foi feita. Os arquivos de `.log`e `.csv` deste teste estão anexados na PR.
- [ ] Uma coleta-teste **completa** foi feita. Os arquivos de `.log` e `.csv` deste teste estão anexados na PR.

#### Verificações
- [ ] Eu experimentei abrir alguns arquivos de diários oficiais coletados pelo meu raspador e verifiquei eles [conforme a documentação](https://docs.queridodiario.ok.org.br/pt-br/latest/contribuindo/raspadores.html#diarios-oficiais-coletados) não encontrando problemas.
- [ ] Eu verifiquei os arquivos `.csv` gerados pela minha coleta [conforme a documentação](https://docs.queridodiario.ok.org.br/pt-br/latest/contribuindo/raspadores.html#arquivos-auxiliares) não encontrando problemas.
- [ ] Eu verifiquei os arquivos de `.log` gerados pela minha coleta [conforme a documentação](https://docs.queridodiario.ok.org.br/pt-br/latest/contribuindo/raspadores.html#arquivos-auxiliares) não encontrando problemas.

#### Descrição

Expand Down
File renamed without changes.
16 changes: 7 additions & 9 deletions data_collection/gazette/database/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,28 +49,28 @@ def load_territories(engine):
logger.info("Populating 'territories' table - Done!")


def get_new_spiders(session, territory_spider_map):
def get_new_or_modified_spiders(session, territory_spider_map):
registered_spiders = session.query(QueridoDiarioSpider).all()
registered_spiders_set = {
(spider.spider_name, territory.id, spider.date_from)
for spider in registered_spiders
for territory in spider.territories
}
only_new_spiders = [
only_new_or_modified_spiders = [
spider_info
for spider_info in territory_spider_map
if spider_info not in registered_spiders_set
]
return only_new_spiders
return only_new_or_modified_spiders


def load_spiders(engine, territory_spider_map):
Session = sessionmaker(bind=engine)
session = Session()

table_is_populated = session.query(QueridoDiarioSpider).count() > 0
new_spiders = (
get_new_spiders(session, territory_spider_map)
spiders_to_persist = (
get_new_or_modified_spiders(session, territory_spider_map)
if table_is_populated
else territory_spider_map
)
Expand All @@ -80,20 +80,18 @@ def load_spiders(engine, territory_spider_map):
territories = session.query(Territory).all()
territory_map = {t.id: t for t in territories}

spiders = []
for info in new_spiders:
for info in spiders_to_persist:
spider_name, territory_id, date_from = info
territory = territory_map.get(territory_id)
if territory is not None:
spiders.append(
session.merge(
QueridoDiarioSpider(
spider_name=spider_name,
date_from=date_from,
territories=[territory],
)
)

session.add_all(spiders)
session.commit()
logger.info("Populating 'querido_diario_spider' table - Done!")

Expand Down
32 changes: 28 additions & 4 deletions data_collection/gazette/pipelines.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import datetime as dt
from pathlib import Path

import filetype
from itemadapter import ItemAdapter
from scrapy import spiderloader
from scrapy.exceptions import DropItem
Expand Down Expand Up @@ -164,11 +165,34 @@ def item_completed(self, results, item, info):

def file_path(self, request, response=None, info=None, item=None):
"""
Path to save the files, modified to organize the gazettes in directories.
The files will be under <territory_id>/<gazette date>/.
Path to save the files, modified to organize the gazettes in directories
and with the right file extension added.
The files will be under <territory_id>/<gazette date>/<filename>.
"""
filepath = super().file_path(request, response=response, info=info, item=item)
filepath = Path(
super().file_path(request, response=response, info=info, item=item)
)
# The default path from the scrapy class begins with "full/". In this
# class we replace that with the territory_id and gazette date.
filename = Path(filepath).name
filename = filepath.name

if response is not None and not filepath.suffix:
filename = self._get_filename_with_extension(filename, response)

return str(Path(item["territory_id"], item["date"], filename))

def _get_filename_with_extension(self, filename, response):
# The majority of the Gazettes are PDF files, so we can check it
# faster validating document Content-Type before using a more costly
# check with filetype library
file_extension = (
".pdf" if response.headers.get("Content-Type") == b"application/pdf" else ""
)

if not file_extension:
# Checks file extension from file header if possible
max_file_header_size = 261
file_kind = filetype.guess(response.body[:max_file_header_size])
file_extension = f".{file_kind.extension}" if file_kind is not None else ""

return f"{filename}{file_extension}"
2 changes: 2 additions & 0 deletions data_collection/gazette/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:108.0) Gecko/20100101 Firefox/108.0"
)

TEMPLATES_DIR = "templates"

DOWNLOAD_TIMEOUT = 360

FILES_STORE = config("FILES_STORE", default="data")
Expand Down
11 changes: 11 additions & 0 deletions data_collection/gazette/spiders/al/al_igaci.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
from datetime import date

from gazette.spiders.base.sai import SaiGazetteSpider


class AlIgaciSpider(SaiGazetteSpider):
TERRITORY_ID = "2703106"
name = "al_igaci"
allowed_domains = ["igaci.al.gov.br"]
base_url = "https://www.igaci.al.gov.br"
start_date = date(2015, 7, 17)
3 changes: 3 additions & 0 deletions data_collection/gazette/spiders/al/al_maceio.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
from datetime import date

from gazette.spiders.base.sigpub import SigpubGazetteSpider


class AlMaceioSpider(SigpubGazetteSpider):
name = "al_maceio"
TERRITORY_ID = "2704302"
CALENDAR_URL = "https://www.diariomunicipal.com.br/maceio"
start_date = date(2018, 8, 9)
2 changes: 2 additions & 0 deletions data_collection/gazette/spiders/am/am_manaus.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@


class AmManausSpider(BaseGazetteSpider):
zyte_smartproxy_enabled = True

name = "am_manaus"
allowed_domains = ["dom.manaus.am.gov.br"]
start_date = datetime.date(2000, 4, 3)
Expand Down
11 changes: 11 additions & 0 deletions data_collection/gazette/spiders/ba/ba_abare.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
from datetime import date

from gazette.spiders.base.sai import SaiGazetteSpider


class BaAbareSpider(SaiGazetteSpider):
TERRITORY_ID = "2900207"
name = "ba_abare"
allowed_domains = ["sai.io.org.br"]
base_url = "https://sai.io.org.br/ba/abare"
start_date = date(2007, 1, 9)
2 changes: 1 addition & 1 deletion data_collection/gazette/spiders/ba/ba_acajutiba.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
class BaAcajutibaSpider(DoemGazetteSpider):
TERRITORY_ID = "2900306"
name = "ba_acajutiba"
start_date = date(2018, 1, 2)
state_city_url_part = "ba/acajutiba"
start_date = date(2013, 1, 30)
11 changes: 11 additions & 0 deletions data_collection/gazette/spiders/ba/ba_adustina.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
from datetime import date

from gazette.spiders.base.sai import SaiGazetteSpider


class BaAdustinaSpider(SaiGazetteSpider):
TERRITORY_ID = "2900355"
name = "ba_adustina"
allowed_domains = ["adustina.ba.gov.br"]
base_url = "https://www.adustina.ba.gov.br"
start_date = date(2017, 1, 3)
2 changes: 1 addition & 1 deletion data_collection/gazette/spiders/ba/ba_alagoinhas.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
class BaAlagoinhasSpider(DoemGazetteSpider):
TERRITORY_ID = "2900702"
name = "ba_alagoinhas"
start_date = date(2018, 1, 2) # edition_number 1.950
state_city_url_part = "ba/alagoinhas"
start_date = date(2015, 1, 28)
11 changes: 11 additions & 0 deletions data_collection/gazette/spiders/ba/ba_almadina.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
from datetime import date

from gazette.spiders.base.sai import SaiGazetteSpider


class BaAlmadinaSpider(SaiGazetteSpider):
TERRITORY_ID = "2900900"
name = "ba_almadina"
allowed_domains = ["almadina.ba.gov.br"]
base_url = "https://www.almadina.ba.gov.br"
start_date = date(2005, 1, 3)
11 changes: 11 additions & 0 deletions data_collection/gazette/spiders/ba/ba_anage.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
from datetime import date

from gazette.spiders.base.sai import SaiGazetteSpider


class BaAnageSpider(SaiGazetteSpider):
TERRITORY_ID = "2901205"
name = "ba_anage"
allowed_domains = ["anage.ba.gov.br"]
base_url = "https://www.anage.ba.gov.br"
start_date = date(2007, 1, 12)
11 changes: 11 additions & 0 deletions data_collection/gazette/spiders/ba/ba_andorinha.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
from datetime import date

from gazette.spiders.base.sai import SaiGazetteSpider


class BaAndorinhaSpider(SaiGazetteSpider):
TERRITORY_ID = "2901353"
name = "ba_andorinha"
allowed_domains = ["andorinha.ba.gov.br"]
base_url = "https://www.andorinha.ba.gov.br"
start_date = date(2013, 1, 2)
2 changes: 1 addition & 1 deletion data_collection/gazette/spiders/ba/ba_angical.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
class BaAngicalSpider(DoemGazetteSpider):
TERRITORY_ID = "2901403"
name = "ba_angical"
start_date = date(2021, 1, 4)
state_city_url_part = "ba/angical"
start_date = date(2021, 1, 4)
2 changes: 1 addition & 1 deletion data_collection/gazette/spiders/ba/ba_caetite.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
class BaCaetiteSpider(DoemGazetteSpider):
TERRITORY_ID = "2905206"
name = "ba_caetite"
start_date = date(2021, 4, 27)
state_city_url_part = "ba/caetite"
start_date = date(2021, 4, 27)
10 changes: 10 additions & 0 deletions data_collection/gazette/spiders/ba/ba_campo_alegre_de_lourdes.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
from datetime import date

from gazette.spiders.base.doem import DoemGazetteSpider


class BaCampoAlegreDeLourdesSpider(DoemGazetteSpider):
TERRITORY_ID = "2905909"
name = "ba_campo_alegre_de_lourdes"
state_city_url_part = "ba/campoalegredelourdes"
start_date = date(2020, 11, 30)
2 changes: 1 addition & 1 deletion data_collection/gazette/spiders/ba/ba_campo_formoso.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
class BaCampoFormosoSpider(DoemGazetteSpider):
TERRITORY_ID = "2906006"
name = "ba_campo_formoso"
start_date = date(2018, 1, 3) # edition_number 873
state_city_url_part = "ba/campoformoso"
start_date = date(2013, 1, 31)
2 changes: 1 addition & 1 deletion data_collection/gazette/spiders/ba/ba_canudos.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
class BaCanudosSpider(DoemGazetteSpider):
TERRITORY_ID = "2906824"
name = "ba_canudos"
start_date = date(2013, 1, 4) # edition number 444
state_city_url_part = "ba/canudos"
start_date = date(2013, 1, 4)
2 changes: 1 addition & 1 deletion data_collection/gazette/spiders/ba/ba_cipo.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
class BaCipoSpider(DoemGazetteSpider):
TERRITORY_ID = "2907905"
name = "ba_cipo"
start_date = date(2021, 1, 4)
state_city_url_part = "ba/cipo"
start_date = date(2021, 1, 4)
11 changes: 11 additions & 0 deletions data_collection/gazette/spiders/ba/ba_correntina.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
from datetime import date

from gazette.spiders.base.sai import SaiGazetteSpider


class BaCorrentinaSpider(SaiGazetteSpider):
TERRITORY_ID = "2909307"
name = "ba_correntina"
allowed_domains = ["sai.io.org.br"]
base_url = "https://sai.io.org.br/ba/correntina"
start_date = date(2007, 11, 30)
2 changes: 1 addition & 1 deletion data_collection/gazette/spiders/ba/ba_cotegipe.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
class BaCotegipeSpider(DoemGazetteSpider):
TERRITORY_ID = "2909406"
name = "ba_cotegipe"
start_date = date(2023, 1, 5)
state_city_url_part = "ba/cotegipe"
start_date = date(2023, 1, 5)
2 changes: 1 addition & 1 deletion data_collection/gazette/spiders/ba/ba_cristopolis.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
class BaCristopolisSpider(DoemGazetteSpider):
TERRITORY_ID = "2909703"
name = "ba_cristopolis"
start_date = date(2021, 1, 12)
state_city_url_part = "ba/cristopolis"
start_date = date(2021, 1, 12)
2 changes: 1 addition & 1 deletion data_collection/gazette/spiders/ba/ba_cruz_das_almas.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
class BaCruzDasAlmasSpider(DoemGazetteSpider):
TERRITORY_ID = "2909802"
name = "ba_cruz_das_almas"
start_date = date(2021, 4, 1)
state_city_url_part = "ba/cruzdasalmas"
start_date = date(2021, 4, 1)
2 changes: 1 addition & 1 deletion data_collection/gazette/spiders/ba/ba_esplanada.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
class BaEsplanadaSpider(DoemGazetteSpider):
TERRITORY_ID = "2910602"
name = "ba_esplanada"
start_date = date(2021, 1, 4)
state_city_url_part = "ba/esplanada"
start_date = date(2021, 1, 4)
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
class BaFormosaDoRioPretoSpider(DoemGazetteSpider):
TERRITORY_ID = "2911105"
name = "ba_formosa_do_rio_preto"
start_date = date(2021, 1, 4)
state_city_url_part = "ba/formosadoriopreto"
start_date = date(2021, 1, 4)
2 changes: 1 addition & 1 deletion data_collection/gazette/spiders/ba/ba_irara.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
class BaIraraSpider(DoemGazetteSpider):
TERRITORY_ID = "2914505"
name = "ba_irara"
start_date = date(2018, 1, 3)
state_city_url_part = "ba/irara"
start_date = date(2014, 4, 24)
2 changes: 1 addition & 1 deletion data_collection/gazette/spiders/ba/ba_itaberaba.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
class BaItaberabaSpider(DoemGazetteSpider):
TERRITORY_ID = "2914703"
name = "ba_itaberaba"
start_date = date(2022, 7, 4)
state_city_url_part = "ba/itaberaba"
start_date = date(2022, 7, 4)
2 changes: 1 addition & 1 deletion data_collection/gazette/spiders/ba/ba_itamaraju.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
class BaItamarajuSpider(DoemGazetteSpider):
TERRITORY_ID = "2915601"
name = "ba_itamaraju"
start_date = date(2008, 3, 28)
state_city_url_part = "ba/itamaraju"
start_date = date(2008, 3, 28)
Loading