Documentation
¶
Index ¶
- Constants
- Variables
- func IsDigitalVideoURL(url string) bool
- 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) (*model.MovieInfo, error)
- func (fz *FANZA) GetMovieReviewsByID(id string) (reviews []*model.MovieReviewDetail, err error)
- func (fz *FANZA) GetMovieReviewsByURL(rawURL string) (reviews []*model.MovieReviewDetail, err error)
- func (fz *FANZA) NormalizeMovieID(id string) string
- func (fz *FANZA) NormalizeMovieKeyword(keyword string) string
- func (fz *FANZA) ParseMovieIDFromURL(rawURL string) (id string, err error)
- func (fz *FANZA) SearchMovie(keyword string) ([]*model.MovieSearchResult, error)
- func (fz *FANZA) SetRequestTimeout(timeout time.Duration)
Constants ¶
View Source
const ( Name = "FANZA" Priority = 1000 + 1 )
Variables ¶
View Source
var (
ErrRegionNotAvailable = errors.New(regionNotAvailable)
)
Functions ¶
func IsDigitalVideoURL ¶
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) GetMovieReviewsByID ¶
func (fz *FANZA) GetMovieReviewsByID(id string) (reviews []*model.MovieReviewDetail, err error)
func (*FANZA) GetMovieReviewsByURL ¶
func (fz *FANZA) GetMovieReviewsByURL(rawURL string) (reviews []*model.MovieReviewDetail, err error)
func (*FANZA) NormalizeMovieID ¶
func (*FANZA) NormalizeMovieKeyword ¶
func (*FANZA) ParseMovieIDFromURL ¶
func (*FANZA) SearchMovie ¶
func (fz *FANZA) SearchMovie(keyword string) ([]*model.MovieSearchResult, error)
func (*FANZA) SetRequestTimeout ¶
Click to show internal directories.
Click to hide internal directories.