Last active
September 21, 2020 15:32
-
-
Save shinderuman/87a86cb05c36cbd1b06f1335515ecebc 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 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