nhentai

package module
v0.0.0-...-7363b81 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 11, 2019 License: GPL-3.0 Imports: 7 Imported by: 0

README

Go nhentai Web Scraper

GoDoc

A web scraper for nhentai written in go

Documentation

Overview

nHentai-go - A web scraping library for pulling doujinshi from nhentai after the public api was taken down. Provides the ability to search based on keyword, tag or id, with id providing full infomation about the doujinshi.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Doujinshi

type Doujinshi struct {
	ID         string
	Title      string
	TotalPages int
	Pages      []Page
	Tags       []string
	URL        string
	MediaID    string
}

Doujinshi - Information and content from a given id

func Get

func Get(id int) (*Doujinshi, error)

Get - get a doujinshi by nHentai id

type Page

type Page struct {
	Ext string
	Num int
}

Page - A single page of a doujinshi

type SearchResponse

type SearchResponse struct {
	MaxPage int
	Results []SearchResult
}

SearchResponse - The reponse from a nhentai search query

func Search(query string, page int) (*SearchResponse, error)

Search - Search for a term on nHentai and return results

func Tag

func Tag(query string, page int) (*SearchResponse, error)

Tag - Search for a tag on nHentai and return results

type SearchResult

type SearchResult struct {
	ID       string
	Title    string
	ThumbURL string
	URL      string
}

SearchResult - A single result from a search

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL