Fix/IMDB and comando-filmes date detection (#26)

* chg: fix: data and imdb detection

* chg: fix: improve IMDB detection

* chg: feat: add more audio strings
This commit is contained in:
2024-12-13 12:45:17 -03:00
committed by GitHub
parent 88d6d506bf
commit dc3cb3be92
5 changed files with 174 additions and 26 deletions

View File

@@ -6,7 +6,6 @@ import (
"fmt"
"net/http"
"net/url"
"regexp"
"slices"
"strings"
"time"
@@ -186,10 +185,9 @@ func getTorrentsTorrentDosFilmes(ctx context.Context, i *Indexer, link string) (
imdbLink := ""
article.Find("div.content a").Each(func(i int, s *goquery.Selection) {
link, _ := s.Attr("href")
re := regexp.MustCompile(`https://www.imdb.com/title/(tt\d+)`)
matches := re.FindStringSubmatch(link)
if len(matches) > 0 {
imdbLink = matches[0]
_imdbLink, err := getIMDBLink(link)
if err == nil {
imdbLink = _imdbLink
}
})