guestlistapp 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/guestlistapp +12 -7
- metadata +2 -2
data/bin/guestlistapp
CHANGED
@@ -9,14 +9,19 @@ while url
|
|
9
9
|
uri = URI.parse(url)
|
10
10
|
base = "http://#{uri.host}"
|
11
11
|
doc = Nokogiri::HTML(html)
|
12
|
-
$event_name ||= doc.at('.
|
13
|
-
$event_subtitle ||= doc.at('.
|
14
|
-
doc.
|
15
|
-
|
16
|
-
|
17
|
-
|
12
|
+
$event_name ||= doc.at('.leftcolumn h1').inner_text
|
13
|
+
$event_subtitle ||= doc.at('.timeandplace').inner_text
|
14
|
+
doc.xpath("//div[@class='avatar']/..").each do |x|
|
15
|
+
src = x.at(".image-wrapper/img/@src") || x.at("*[@data-image]/@data-image")
|
16
|
+
if src.nil?
|
17
|
+
puts x.to_s
|
18
|
+
exit
|
19
|
+
end
|
20
|
+
item = { name: x.inner_text.strip, img: src }
|
21
|
+
|
22
|
+
$attendees << item
|
18
23
|
end
|
19
|
-
nextpage = doc.at("
|
24
|
+
nextpage = doc.at("*[@data-next-page]/@data-next-page")
|
20
25
|
break unless nextpage
|
21
26
|
url = base + nextpage
|
22
27
|
puts "Getting #{url}"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: guestlistapp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-12-11 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: haml
|