Skip to content

Instantly share code, notes, and snippets.

@shinderuman
Last active September 21, 2020 15:32
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 shinderuman/87a86cb05c36cbd1b06f1335515ecebc to your computer and use it in GitHub Desktop.
Save shinderuman/87a86cb05c36cbd1b06f1335515ecebc to your computer and use it in GitHub Desktop.
package main
import (
"fmt"
"math/rand"
"net/http"
"strings"
"time"
"github.com/PuerkitoBio/goquery"
)
func main() {
rand.Seed(time.Now().UnixNano())
resp, _ := http.Get("https://ja.wikipedia.org/wiki/%E7%89%B9%E5%88%A5:%E3%81%8A%E3%81%BE%E3%81%8B%E3%81%9B%E8%A1%A8%E7%A4%BA")
doc, _ := goquery.NewDocumentFromResponse(resp)
title := doc.Find("#firstHeading").Text()
var s string
switch i := rand.Intn(3); i {
case 0:
s = fmt.Sprintf("%sがめうのお尻から出てくるめう〜〜〜!!", title)
s = strings.Join(strings.Split(s, ""), "゛") + "゛"
case 1:
s = fmt.Sprintf("%sがめうのお尻に入ってくるめうー!!!!!", title)
s = strings.Join(strings.Split(s, ""), "゛") + "゛"
default:
s = fmt.Sprintf("%sはめうのお尻に入らないめう…", title)
}
fmt.Printf("%v\n", s)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment