Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update heydouga.go #112

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions provider/heydouga/heydouga.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@

// Cover
c.OnXML(`//section[@class="movie-player"]//script`, func(e *colly.XMLElement) {
if ss := regexp.MustCompile(`(?i)player_poster\s*=\s*'(http.+?)';`).FindStringSubmatch(e.Text); len(ss) == 2 {
if ss := regexp.MustCompile(`(?i)player_poster\s*=\s*'(*.+?)';`).FindStringSubmatch(e.Text); len(ss) == 2 {

Check failure on line 105 in provider/heydouga/heydouga.go

View workflow job for this annotation

GitHub Actions / lint

SA1000: error parsing regexp: missing argument to repetition operator: `*` (staticcheck)
info.CoverURL = e.Request.AbsoluteURL(ss[1])
info.ThumbURL = info.CoverURL
}
Expand All @@ -111,16 +111,16 @@
// Fields
c.OnXML(`//*[@id="movie-info"]/ul/li`, func(e *colly.XMLElement) {
switch e.ChildText(`.//span[1]`) {
case "配信日:":
case "Release Date:":
info.ReleaseDate = parser.ParseDate(e.ChildText(`.//span[2]`))
case "主演:":
case "Actor:":
// heydouga's actor info is sticky, but whatever...
info.Actors = strings.Fields(e.ChildText(`.//span[2]`))
case "提供元:":
case "Provider:":
if info.Maker = strings.TrimSpace(e.ChildText(`.//span[2]/a[1]`)); info.Maker == "" /* fallback */ {
info.Maker = strings.TrimSpace(e.ChildText(`.//span[2]`))
}
case "動画再生時間:":
case "Movie Duration:":
info.Runtime = parser.ParseRuntime(e.ChildText(`.//span[2]`))
case "ファイル容量:", "画面サイズ:":
// skip, do nothing
Expand Down
Loading