Documentation ¶
Index ¶
- Constants
- func ParseNumber(s string) string
- func PreviewSrc(s string) string
- type FANZA
- func (fz *FANZA) GetMovieInfoByID(id string) (info *model.MovieInfo, err error)
- func (fz *FANZA) GetMovieInfoByURL(rawURL string) (info *model.MovieInfo, err error)
- func (fz *FANZA) NormalizeID(id string) string
- func (fz *FANZA) NormalizeKeyword(keyword string) string
- func (fz *FANZA) ParseIDFromURL(rawURL string) (id string, err error)
- func (fz *FANZA) SearchMovie(keyword string) ([]*model.MovieSearchResult, error)
Constants ¶
View Source
const ( Name = "FANZA" Priority = 1000 + 1 )
Variables ¶
This section is empty.
Functions ¶
func ParseNumber ¶
ParseNumber parses FANZA-formatted id to general ID.
func PreviewSrc ¶
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 ¶
func (*FANZA) GetMovieInfoByID ¶
func (*FANZA) GetMovieInfoByURL ¶
func (*FANZA) NormalizeID ¶
func (*FANZA) NormalizeKeyword ¶
func (*FANZA) ParseIDFromURL ¶
func (*FANZA) SearchMovie ¶
func (fz *FANZA) SearchMovie(keyword string) ([]*model.MovieSearchResult, error)
Click to show internal directories.
Click to hide internal directories.