-
-
Notifications
You must be signed in to change notification settings - Fork 409
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
new spider São Sebastião/SP #1075
Open
almeidadm
wants to merge
1
commit into
okfn-brasil:main
Choose a base branch
from
almeidadm:sp_sao_sebastiao
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 tasks
victorfernandesraton
suggested changes
Sep 22, 2024
Comment on lines
+21
to
+32
if not self.start_date <= parsed_date <= self.end_date: | ||
continue | ||
|
||
gazette_number = re.findall("DOEM_(\d+)_", gazette_url)[0] | ||
|
||
yield Gazette( | ||
date=parsed_date, | ||
edition_number=gazette_number, | ||
is_extra_edition=False, | ||
power="executive_legislative", | ||
file_urls=[gazette_url], | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Eu acho que ficaria mais claro em termos de legibilidade apenas colocar a extração dentro da condição if
Suggested change
if not self.start_date <= parsed_date <= self.end_date: | |
continue | |
gazette_number = re.findall("DOEM_(\d+)_", gazette_url)[0] | |
yield Gazette( | |
date=parsed_date, | |
edition_number=gazette_number, | |
is_extra_edition=False, | |
power="executive_legislative", | |
file_urls=[gazette_url], | |
) | |
if self.start_date <= parsed_date <= self.end_date: | |
gazette_number = re.findall("DOEM_(\d+)_", gazette_url)[0] | |
yield Gazette( | |
date=parsed_date, | |
edition_number=gazette_number, | |
is_extra_edition=False, | |
power="executive_legislative", | |
file_urls=[gazette_url], | |
) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
AO ABRIR um Pull Request de um novo raspador (spider), marque com um
X
cada um dos items do checklistabaixo. NÃO ABRA um novo Pull Request antes de completar todos os items abaixo.
Checklist - Novo spider
start_date
eend_date
definidos) ao menos uma vez e os dados retornados estavam corretos.log_count/ERROR
igual a zero).start_date
no seu spider com a data do Diário Oficial mais antigo disponível na página da cidade.Descrição
Os boletins podem ser consultados em https://www.saosebastiao.sp.gov.br/doem.asp.
O erro 404 encontrado no log é devido o boletim nº 29
https://www.saosebastiao.sp.gov.br/doem/DOEM_029_20170522.pdf
Logs
log_sp_sao_sebastiao.csv
log_sp_sao_sebastiao.txt
resolve #1071