Created
March 29, 2012 16:46
-
-
Save dukex/2239715 to your computer and use it in GitHub Desktop.
New API Proposal to Sally
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sally.start do | |
analise do | |
target "url.com" | |
data { uf: "SP" } | |
method "POST" # or GET | |
end | |
search_and_extract root: "ul#any_resource li" do # root default is html | |
data :name, "div a" # like -> ul li div a | |
data :desc, "#content p" do |p| | |
p.text # passed the element, in example p | |
end | |
end | |
save do | |
# url method | |
method "POST" # or GET | |
url "meuserve.com" | |
# db method | |
server "mydbserver.com" | |
database "mydatabase" | |
username "userX" | |
password "xxxxx" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment