portal_scraper 1.2.0 → 1.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/portal_scraper/accounts/client.rb +4 -2
- data/lib/portal_scraper/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bda292894076f02d59473052af9ae3daa5e05e62bba31b453d86581abd809877
|
4
|
+
data.tar.gz: f5ae9d449f2ff4b868e1984eee05e949182b2a4c800dce15edecfcd3dd86ddc3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4520278d5064e24b6b8850d02289ee75299db9c6b84b098f4b3b654fd7e81594e687830510feec6d98a6192aa88a519816987c89e8fb7c0f5b4990dcde53b513
|
7
|
+
data.tar.gz: e135e07774135f0a319e2575d334ad3c3c3f6ba6f8395cd380e776f288f43b223e4552306502043b03a66a886a1d1c1fa0d5968e3028fd4850918d9e4fbe0b5e
|
@@ -77,8 +77,10 @@ module PortalScraper
|
|
77
77
|
|
78
78
|
def fill_commune(app, form, postal_code, city)
|
79
79
|
app.post(url_for('/tiersCommunes.do'), { codPos: postal_code }).tap do |mappings|
|
80
|
-
|
81
|
-
|
80
|
+
mapping = mappings.search('td.t').find { |c| c.text.strip.include?(city) }
|
81
|
+
code = mapping&.parent.search('a.PL_LST').text.strip
|
82
|
+
form['commune'] = code
|
83
|
+
form['libCommune'] = mapping&.text.strip
|
82
84
|
end
|
83
85
|
end
|
84
86
|
|