Skip to content

Commit

Permalink
mg_belohorizonte
Browse files Browse the repository at this point in the history
  • Loading branch information
juniorcarvalho committed May 8, 2018
1 parent 0003f7e commit 584c153
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion processing/data_collection/gazette/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
'gazette.pipelines.PdfParsingPipeline': 2,
'gazette.pipelines.PostgreSQLPipeline': 3,
}
FILES_STORE = '/home/junior/projetos/scrapy/diario-oficial/data'
FILES_STORE = '/mnt/data/'
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ def parse(self, response):

def parse_pagelink(self,response):
url = response.xpath('//p[contains(@class,"dom-chamadas")]/a/@href').extract_first()
if url is not None:
if url:
url = response.urljoin(url)
yield scrapy.Request(url, self.parse_details)

def parse_details(self, response):
file_url = response.xpath('//a[contains(@alt, "link_anexo")]/@href').extract_first()
items = []
if file_url is not None:
if file_url:
power = 'executive_legislature'
items.append(
Gazette(
Expand Down

0 comments on commit 584c153

Please sign in to comment.