Last active
August 29, 2015 14:07
-
-
Save greevex/e001ab9eb5efd78b3796 to your computer and use it in GitHub Desktop.
This file contains 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
Package "sds.sdk.test.start" | |
Var Queue $queue | |
Block start { | |
$queue.append "http://yandex.ru" | |
Foreach $queue | |
- call this.process | |
} | |
Block process { | |
Input $url | |
Load $url | |
- set proxy "random" | |
- set userAgent generate | |
- set attempts 5 | |
- put result to $content | |
Parse:template $content | |
- set match auto | |
- set on-fail skip | |
- put result to $result | |
If $result.status == false | |
- Output.print "Status FAIL" | |
- break | |
Foreach $result.items | |
- call API.document.post | |
Foreach $result.links | |
- call $queue.append | |
Return $result | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment