Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ---
- config:
- debug: 2
- agent: "Firefox"
- do:
- - walk:
- to: 'http://www.illinoisschools.com/private-schools/'
- do:
- - find:
- path: table.DataTable
- do:
- - find:
- path: a
- do:
- - parse:
- attr: href
- - walk:
- to: value
- do:
- - find:
- path: table.DataTable
- do:
- - find:
- path: a
- do:
- - parse:
- attr: href
- - walk:
- to: value
- do:
- - find:
- path: table:has(h1)
- do:
- - object_new: school
- - find:
- path: h1
- do:
- - parse
- - object_field_set:
- object: school
- field: name
- - parse:
- filter: ยป\s+(.+)\s+County\s+ยป
- - object_field_set:
- object: school
- field: county
- - find:
- path: table[cellpadding="3"]
- do:
- - find:
- path: tr:contains('School Address:')>td:nth-of-type(2)
- do:
- - parse:
- filter: ^([^,]+),
- - object_field_set:
- object: school
- field: street
- - parse:
- filter: ^[^,]+,\s+([^,]+),
- - object_field_set:
- object: school
- field: city
- - register_set: IL
- - object_field_set:
- object: school
- field: state
- - register_set: ''
- - object_field_set:
- object: school
- field: zip
- - find:
- path: tr:contains('Phone Number:')>td:nth-of-type(2)
- do:
- - parse
- - object_field_set:
- object: school
- field: phone
- - object_save:
- name: school
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement