<commit_before>package main

import (
	"log"
	"strconv"
	"strings"
	"time"

	"github.com/PuerkitoBio/goquery"

	"github.com/mnhkahn/maodou"
	"github.com/mnhkahn/maodou/cygo"
	"github.com/mnhkahn/maodou/models"
)

type Duokan struct {
	maodou.MaoDou
}

func NewDuokan() *Duokan {
	duo := new(Duokan)
	duo.Init()
	duo.SetDao("duoshuo", `{"short_name":"cyeam","secret":"<KEY>","thread_key":"39392"}`)
	duo.SetRate(time.Duration(24)*time.Hour, time.Duration(5)*time.Second)
	return duo
}

func (this *Duokan) Start() {
	this.Index(nil)
}

func (this *Duokan) Index(resp *maodou.Response) {
	resp, err := this.Cawl("http://www.duokan.com/book/39392")
	if err == nil {
		this.Detail(resp)
	}
}
<commit_msg>update duokan<commit_after>package main

import (
	"log"
	"strconv"
	"strings"
	"time"

	"github.com/PuerkitoBio/goquery"

	"github.com/mnhkahn/maodou"
	"github.com/mnhkahn/maodou/cygo"
	"github.com/mnhkahn/maodou/models"
)

type Duokan struct {
	maodou.MaoDou
}

func NewDuokan() *Duokan {
	duo := new(Duokan)
	duo.Init()
	duo.SetDao("duoshuo", `{"short_name":"cyeam","secret":"<KEY>","thread_key":"39392"}`)
	duo.SetRate(time.Duration(24)*time.Hour, time.Duration(5)*time.Second)
	return duo
}

func (this *Duokan) Start() {
	this.Index(nil)
}

func (this *Duokan) Index(resp *maodou.Response) {
	resp, err := this.Cawl("http://www.duokan.com/book/39392", maodou.CAWL_NOPROXY)
	if err == nil {
		this.Detail(resp)
	}
}

{'fraction_non_alphanumeric': 0.1900070372976777, 'fraction_numerical': 0.018296973961998593, 'mean_word_length': 4.925, 'pattern_counts': {'":': 6, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7204092', 'n_tokens_mistral': 681, 'n_tokens_neox': 649, 'n_words': 90}