Agen Terpercaya  
 
 
 
 
Pasang iklan, hanya lewat Contact Us.
Waspada penipuan iklan. Klik di sini untuk melihat daftar penipu.

SHARE Download Cerbung ke file .txt Supaya lebih mudah baca

ngentotpw

Suka Semprot
Daftar
29 Dec 2015
Post
5
Like diterima
7
Bimabet
Pingin nge share source code Go Lang buat nge download cerbung ke file berekstensi txt biar pas nge bacanya lebih enak, ga usah klik next terus 🤣

install depedency-nya dulu pke command

go get -u github.com/gocolly/colly/...

Rich (BB code):
package main

import (
    "fmt"
    "os"

    "github.com/gocolly/colly"
)

func main() {
    URL_CERBUNG := "https://www.semprot.com/threads/pembantu-asik.1154808/page"
    NUM_OF_PAGE := 26

    // Init Colly
    c := colly.NewCollector()
    // Init File
    f, _ := os.Create("cerbung.txt")

    // What todo when colly finds a div with .myLTS class
    c.OnHTML("div .myLiTS", func(e *colly.HTMLElement) {
        f.WriteString(e.Text)
    })

    // whan colly finisher scrap
    c.OnScraped(func(r *colly.Response) {
        fmt.Printf("Finished %s \n", r.Request.URL)
    })

    j := 1
    for j < NUM_OF_PAGE+1 {
        c.Visit(fmt.Sprintf("%s-%d", URL_CERBUNG, j))
        j += 1
    }
}
 
Pingin nge share source code Go Lang buat nge download cerbung ke file berekstensi txt biar pas nge bacanya lebih enak, ga usah klik next terus 🤣

install depedency-nya dulu pke command

go get -u github.com/gocolly/colly/...

Rich (BB code):
package main

import (
    "fmt"
    "os"

    "github.com/gocolly/colly"
)

func main() {
    URL_CERBUNG := "https://www.semprot.com/threads/pembantu-asik.1154808/page"
    NUM_OF_PAGE := 26

    // Init Colly
    c := colly.NewCollector()
    // Init File
    f, _ := os.Create("cerbung.txt")

    // What todo when colly finds a div with .myLTS class
    c.OnHTML("div .myLiTS", func(e *colly.HTMLElement) {
        f.WriteString(e.Text)
    })

    // whan colly finisher scrap
    c.OnScraped(func(r *colly.Response) {
        fmt.Printf("Finished %s \n", r.Request.URL)
    })

    j := 1
    for j < NUM_OF_PAGE+1 {
        c.Visit(fmt.Sprintf("%s-%d", URL_CERBUNG, j))
        j += 1
    }
}
Mantap suhu ... Jika url di ganti tdk cerbung bs kah..atau hny cerbung?
 
Harusnya bisa sih, soalnya script itu buat ngumpulin semua reply yang dari pembuat thread.
Tinggal di atur url berarti ya suhu...cerdas idenya suhu...makasih ilmunya
 
karena gabud akhirnya coba take this to the next level, bikin semprot downloader versi CLI hahaha
jadi penampakannya kyk gini



pertama, disitu agan bakal diminta masukin cookie session untuk akses forum yang sifatnya UG. ini optional.
kedua, agan bisa masukin nama forumnya, defaultnya cerita-bersambung.139
selanjutnya, agan tinggal pilih thread nya yang mau di download



habis itu cek folder output, nah kedownload deh jadi file html

nunggu reaksi dlu, baru ane share .exe nya yaa hehe
 
karena gabud akhirnya coba take this to the next level, bikin semprot downloader versi CLI hahaha
jadi penampakannya kyk gini



pertama, disitu agan bakal diminta masukin cookie session untuk akses forum yang sifatnya UG. ini optional.
kedua, agan bisa masukin nama forumnya, defaultnya cerita-bersambung.139
selanjutnya, agan tinggal pilih thread nya yang mau di download



habis itu cek folder output, nah kedownload deh jadi file html

nunggu reaksi dlu, baru ane share .exe nya yaa hehe
thx hu. update terus ya hu untuk info nya
 
karena gabud akhirnya coba take this to the next level, bikin semprot downloader versi CLI hahaha
jadi penampakannya kyk gini



pertama, disitu agan bakal diminta masukin cookie session untuk akses forum yang sifatnya UG. ini optional.
kedua, agan bisa masukin nama forumnya, defaultnya cerita-bersambung.139
selanjutnya, agan tinggal pilih thread nya yang mau di download



habis itu cek folder output, nah kedownload deh jadi file html

nunggu reaksi dlu, baru ane share .exe nya yaa hehe
Mantap hu. Udah ada kah
 
Gaple Online Indonesia
Pasang iklan hanya lewat CONTACT US
Back
Top
We are now part of LS Media Ltd