Commit 1987cd3a authored by Yihua Huang's avatar Yihua Huang Committed by GitHub

Merge pull request #408 from code4craft/0.6.0

groovy demo
parents 65fe2c44 862ceee6
......@@ -16,6 +16,11 @@
<artifactId>jruby</artifactId>
<version>1.7.6</version>
</dependency>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-all</artifactId>
<version>2.1.6</version>
</dependency>
<dependency><groupId>org.python</groupId>
<artifactId>jython</artifactId>
<version>2.5.3</version>
......
Github {
Site {
sleepTime 0
timeOut 100
retryTimes 3
userAgent ['a','b','c'].random
}
match "https://github.com/\\w+/\\w+" {
addUrl(url.regex("https://github.com/\\w+/\\w+"))
return {
name: html.xpath("//h1[@class='entry-title public']/strong/a/text()")
author: html.xpath "https://github\\.com/(\\w+)/.*"
readme: html.xpath "//div[@id='readme']/tidyText()"
star : toInt(html.xpath("//div[@id='readme']/tidyText()"))
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment