-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscrape css
27 lines (25 loc) · 890 Bytes
/
scrape css
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
puts "got name?"
# puts "start city..."
# if browser.has_css?('table.zebra tbody tr:nth-child(3) td:nth-child(2) a:nth-child(1)')
# city = browser.all('table.zebra tbody tr:nth-child(3) td:nth-child(2) a:nth-child(1)').first.text
# puts city
# cities << city
# else
# city = "no city provided"
# cities << city
# end
# puts "got city?"
# if browser.has_css?('table.zebra tbody tr:nth-child(4) td:nth-child(2) a:nth-child(1)')
# province = browser.all('table.zebra tbody tr:nth-child(4) td:nth-child(2) a:nth-child(1)').first.text
# provinces << province
# else
# province = "no province provided"
# provinces << province
# end
# if browser.has_css?('table tbody tr td a.jrButtonLink')
# website = browser.all('table tbody tr td a.jrButtonLink').first['href']
# websites << website
# else
# website = "no website provided"
# websites << website
# end