fanza

package
v1.0.25 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2022 License: GPL-3.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Name     = "FANZA"
	Priority = 1000 + 1
)

Variables

This section is empty.

Functions

func ParseNumber

func ParseNumber(s string) string

ParseNumber parses FANZA-formatted id to general ID.

func PreviewSrc

func PreviewSrc(s string) string

PreviewSrc maximize the preview image. Ref: https://digstatic.dmm.com/js/digital/preview_jquery.js#652 JS Code: // 画像パスの正規化 function preview_src(src)

{
	  if (src.match(/(p[a-z]\.)jpg/)) {
		  return src.replace(RegExp.$1, 'pl.');
	  } else if (src.match(/consumer_game/)) {
		  return src.replace('js-','-');
	  } else if (src.match(/js\-([0-9]+)\.jpg$/)) {
		  return src.replace('js-','jp-');
	  } else if (src.match(/ts\-([0-9]+)\.jpg$/)) {
		  return src.replace('ts-','tl-');
	  } else if (src.match(/(\-[0-9]+\.)jpg$/)) {
		  return src.replace(RegExp.$1, 'jp' + RegExp.$1);
	  } else {
		  return src.replace('-','jp-');
	  }
}

Types

type FANZA

type FANZA struct {
	*scraper.Scraper
}

func New

func New() *FANZA

func (*FANZA) GetMovieInfoByID

func (fz *FANZA) GetMovieInfoByID(id string) (info *model.MovieInfo, err error)

func (*FANZA) GetMovieInfoByURL

func (fz *FANZA) GetMovieInfoByURL(rawURL string) (info *model.MovieInfo, err error)

func (*FANZA) NormalizeID

func (fz *FANZA) NormalizeID(id string) string

func (*FANZA) NormalizeKeyword

func (fz *FANZA) NormalizeKeyword(keyword string) string

func (*FANZA) ParseIDFromURL

func (fz *FANZA) ParseIDFromURL(rawURL string) (id string, err error)

func (*FANZA) SearchMovie

func (fz *FANZA) SearchMovie(keyword string) ([]*model.MovieSearchResult, error)

Jump to

Keyboard shortcuts

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