forked from labic/ze-the-scraper
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Estaduais - RN,RO,RR,SE,TO
- Loading branch information
Showing
7 changed files
with
580 additions
and
4 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
# -*- coding: utf-8 -*- | ||
from . import ZeSpider | ||
|
||
|
||
class GovernoRioGrandedoNorte(ZeSpider): | ||
|
||
name = 'govrn' | ||
allowed_domains = ['rn.gov.br'] | ||
items_refs = [{ | ||
"item": "ze.items.creativework.ArticleItem", | ||
"fields": { | ||
"name": { | ||
"selectors": { | ||
"css": [ | ||
"meta[property='og:title']::attr(content)", | ||
"meta[name=title]::attr(content)", | ||
'[itemprop=headline]::text', | ||
'.title-post::text', | ||
'[itemprop="headline"] a::text', | ||
'h1 a::text' | ||
] | ||
} | ||
}, | ||
"image": { | ||
"selectors": { | ||
"css": [ | ||
"meta[property='og:description']::attr(content)", | ||
"meta[name=description]::attr(content)", | ||
'meta[property="og:image"]::attr(content)', | ||
'[itemprop="image"]::attr(src)', | ||
'.lazy::attr("data-lazy-src")' | ||
] | ||
} | ||
}, | ||
"description": { | ||
"selectors": { | ||
"css": [ | ||
'[itemprop=description]::attr(content)', | ||
'[itemprop=description]::text', | ||
'.entry-content h2::text', | ||
'.linha-fina::text', | ||
'.entry-content blockquote p::text', | ||
'[property="og:description"]::attr(content)' | ||
] | ||
} | ||
}, | ||
"author": { | ||
"selectors": { | ||
"css": [ | ||
'[name=author]::attr(content)', | ||
'[itemprop=author]::text', | ||
'.author a::text', | ||
'.credito::text' | ||
] | ||
} | ||
}, | ||
"datePublished": { | ||
"selectors": { | ||
"css": [ | ||
'[itemprop=datePublished]::attr(content)', | ||
'.entry-date::text', | ||
'[property="article:published_time"]::attr(content)', | ||
'[itemprop="datePublished"]::attr(datetime)', | ||
'.credito span::text' | ||
|
||
] | ||
} | ||
}, | ||
"dateModified": { | ||
"selectors": { | ||
"css": [ | ||
'[itemprop=dateModified]::attr(content)', | ||
'[property="article:modified_time"]::attr(content)', | ||
'[itemprop="dateModified"]::attr(datetime)' | ||
|
||
] | ||
} | ||
}, | ||
"articleBody": { | ||
"selectors": { | ||
"css": [ | ||
'[itemprop=articleBody]', | ||
'.noticia', | ||
'article.article-main', | ||
'.Conteiner #P000' | ||
] | ||
} | ||
}, | ||
"keywords": { | ||
"selectors": { | ||
"css": [ | ||
'[itemprop=keywords] a::text', | ||
'[rel=tag]::text', | ||
'.categories a::text', | ||
'.tags a::text' | ||
] | ||
} | ||
} | ||
} | ||
}] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
# -*- coding: utf-8 -*- | ||
from . import ZeSpider | ||
|
||
|
||
class GovernoRondonia(ZeSpider): | ||
|
||
name = 'govro' | ||
allowed_domains = ['ro.gov.br'] | ||
items_refs = [{ | ||
"item": "ze.items.creativework.ArticleItem", | ||
"fields": { | ||
"name": { | ||
"selectors": { | ||
"css": [ | ||
"meta[property='og:title']::attr(content)", | ||
"meta[name=title]::attr(content)", | ||
'[itemprop=headline]::text', | ||
'.title-post::text', | ||
'[itemprop="headline"] a::text', | ||
'h1 a::text' | ||
] | ||
} | ||
}, | ||
"image": { | ||
"selectors": { | ||
"css": [ | ||
"meta[property='og:description']::attr(content)", | ||
"meta[name=description]::attr(content)", | ||
'meta[property="og:image"]::attr(content)', | ||
'[itemprop="image"]::attr(src)', | ||
'.lazy::attr("data-lazy-src")' | ||
] | ||
} | ||
}, | ||
"description": { | ||
"selectors": { | ||
"css": [ | ||
'[itemprop=description]::attr(content)', | ||
'[itemprop=description]::text', | ||
'.entry-content h2::text', | ||
'.linha-fina::text', | ||
'.entry-content blockquote p::text', | ||
'[property="og:description"]::attr(content)' | ||
] | ||
} | ||
}, | ||
"author": { | ||
"selectors": { | ||
"css": [ | ||
'[name=author]::attr(content)', | ||
'[itemprop=author]::text', | ||
'.author a::text', | ||
'.credito::text' | ||
] | ||
} | ||
}, | ||
"datePublished": { | ||
"selectors": { | ||
"css": [ | ||
'[itemprop=datePublished]::attr(content)', | ||
'.entry-date::text', | ||
'[property="article:published_time"]::attr(content)', | ||
'[itemprop="datePublished"]::attr(datetime)', | ||
'.data span::text' | ||
|
||
] | ||
} | ||
}, | ||
"dateModified": { | ||
"selectors": { | ||
"css": [ | ||
'[itemprop=dateModified]::attr(content)', | ||
'[property="article:modified_time"]::attr(content)', | ||
'[itemprop="dateModified"]::attr(datetime)' | ||
|
||
] | ||
} | ||
}, | ||
"articleBody": { | ||
"selectors": { | ||
"css": [ | ||
'[itemprop=articleBody]', | ||
'.noticia', | ||
'article.article-main', | ||
'.entry' | ||
] | ||
} | ||
}, | ||
"keywords": { | ||
"selectors": { | ||
"css": [ | ||
'[itemprop=keywords] a::text', | ||
'[rel=tag]::text', | ||
'.categories a::text', | ||
'.tags a::text' | ||
] | ||
} | ||
} | ||
} | ||
}] |
Oops, something went wrong.