Skip to content

Instantly share code, notes, and snippets.

@beothorn
Created June 15, 2014 04:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save beothorn/37b23278a3d05c0e083b to your computer and use it in GitHub Desktop.
Save beothorn/37b23278a3d05c0e083b to your computer and use it in GitHub Desktop.
package webGrude;
import webGrude.annotations.Page;
import webGrude.annotations.Selector;
import java.util.List;
public class PirateBayExample {
@Page("http://thepiratebay.se/search/{0}/0/7/0")
public static class SearchResult {
@Selector(value = "#searchResult tbody tr td a[href*=magnet]", attr = "href") public List<String> magnets;
}
public static void main(String... args){
Browser.open(SearchResult.class, "ubuntu iso").magnets.forEach(s -> System.out.println(s));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment