xupa_emec 1.0.3 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/xupa_emec/crawler.rb +6 -4
- data/lib/xupa_emec/version.rb +1 -1
- data/xupa_emec.gemspec +1 -1
- metadata +3 -3
data/lib/xupa_emec/crawler.rb
CHANGED
@@ -53,10 +53,12 @@ module XupaEmec
|
|
53
53
|
|
54
54
|
if @search_courses
|
55
55
|
courses_page= agent.get("http://emec.mec.gov.br/emec/consulta-ies/listar-curso-agrupado/#{ies_url}/page/1/list/1000")
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
56
|
+
match_results = courses_page.search("div.campform > div:first-child").text.match(/Registro\(s\)\: 1 a \d+ de (\d+)/)
|
57
|
+
if match_results
|
58
|
+
ies_info['num_cursos'] = match_results[1]
|
59
|
+
ies_info['lista_cursos'] = courses_page.search("table#listar-ies-cadastro > tbody > tr").map{|l| l.search('td').first.text.gsub(' ', '').strip}.join(', ')
|
60
|
+
end
|
61
|
+
end
|
60
62
|
puts "Informação processada para '#{ies_search_name}' :"
|
61
63
|
puts ies_info.to_yaml
|
62
64
|
|
data/lib/xupa_emec/version.rb
CHANGED
data/xupa_emec.gemspec
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: xupa_emec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 31
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 1.0.
|
9
|
+
- 4
|
10
|
+
version: 1.0.4
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- "Bernardo de P\xC3\xA1dua"
|