Пример #1
0
func FeedURL(p ListParams) string {
	language := p.Language
	if len(language) == 0 {
		language = "all"
	}

	if p.Category != "" {
		tpl := "https://hitomi.la/%s/%s-%s.atom"
		value := common.UrlEncode(p.Value)
		return fmt.Sprintf(tpl, p.Category, value, language)
	}

	return fmt.Sprintf("https://hitomi.la/index-%s.atom", language)
}
Пример #2
0
func ListURL(params ListParams) string {
	language := params.Language
	if len(language) == 0 {
		language = "all"
	}

	page := params.PageNum()
	if params.Category != "" {
		tpl := "https://hitomi.la/%s/%s-%s-%d.html"
		value := common.UrlEncode(params.Value)
		return fmt.Sprintf(tpl, params.Category, value, language, page)
	}

	return fmt.Sprintf("https://hitomi.la/index-%s-%d.html", language, page)
}