8 "github.com/rocketlaunchr/google-search"
12 ctx := context.Background()
13 opts := googlesearch.SearchOptions{
21 common:=" -inurl:(jsp|pl|php|html|aspx|htm|cf|shtml) -inurl:(index_of|listen77|mp3raid|mp3toss|mp3drug|index_of|wallywashis) intitle:\"index.of./\" "
23 VIDEO:=" (avi|mkv|mov|mp4|mpg|wmv)"
24 AUDIO:=" (ac3|flac|m4a|mp3|ogg|wav|wma)"
25 EBOOK:=" (CBZ|CBR|CHM|DOC|DOCX|EPUB|MOBI|ODT|PDF|RTF|txt)"
26 PICTURES:=" (bmp|gif|jpg|png|psd|tif|tiff)"
27 SOFTWARE:=" (apk|exe|iso|rar|tar|zip)"
28 COMPRESSED:=" (7z|bz2|gz|iso|rar|zip)"
30 // implement getModifier()
47 fmt.Println("Usage: scrapper -[flag] \"[your search]\"")
48 fmt.Println("flags = [a]udio [c]ompressed [e]book [p]ictures [s]oftware [v]ideo")
52 query := "intext:\"" + os.Args[2] + "\"" + common + modifier
55 returnLinks, err := googlesearch.Search(ctx, query, opts)
57 fmt.Println("Something went wrong: ", err)
60 if len(returnLinks) == 0 {
61 fmt.Println("no results returned: ", returnLinks)
64 for _, result := range returnLinks {
65 fmt.Println("*", result.URL)