diff --git a/internal/announce/announce.go b/internal/announce/announce.go index b3f72a5..b73e6c1 100644 --- a/internal/announce/announce.go +++ b/internal/announce/announce.go @@ -69,19 +69,19 @@ func (a *announceProcessor) processQueue(queue chan string) { parseFailed := false //patternParsed := false - for _, pattern := range a.indexer.Parse.Lines { + for _, parseLine := range a.indexer.IRC.Parse.Lines { line, err := a.getNextLine(queue) if err != nil { - a.log.Error().Stack().Err(err).Msg("could not get line from queue") + a.log.Error().Err(err).Msg("could not get line from queue") return } a.log.Trace().Msgf("announce: process line: %v", line) // check should ignore - match, err := a.parseExtract(pattern.Pattern, pattern.Vars, tmpVars, line) + match, err := a.parseLine(parseLine.Pattern, parseLine.Vars, tmpVars, line) if err != nil { - a.log.Debug().Msgf("error parsing extract: %v", line) + a.log.Error().Err(err).Msgf("error parsing extract for line: %v", line) parseFailed = true break @@ -95,7 +95,6 @@ func (a *announceProcessor) processQueue(queue chan string) { } if parseFailed { - a.log.Trace().Msg("announce: parse failed") continue } @@ -103,7 +102,7 @@ func (a *announceProcessor) processQueue(queue chan string) { // on lines matched if err := a.onLinesMatched(a.indexer, tmpVars, rls); err != nil { - a.log.Debug().Msgf("error match line: %v", "") + a.log.Error().Err(err).Msg("error match line") continue } @@ -136,6 +135,14 @@ func (a *announceProcessor) AddLineToQueue(channel string, line string) error { return nil } +func (a *announceProcessor) parseLine(pattern string, vars []string, tmpVars map[string]string, line string) (bool, error) { + if len(vars) > 0 { + return a.parseExtract(pattern, vars, tmpVars, line) + } + + return a.parseMatchRegexp(pattern, tmpVars, line) +} + func (a *announceProcessor) parseExtract(pattern string, vars []string, tmpVars map[string]string, line string) (bool, error) { rxp, err := regExMatch(pattern, line) @@ -161,11 +168,28 @@ func (a *announceProcessor) parseExtract(pattern string, vars []string, tmpVars return true, nil } +func (a *announceProcessor) parseMatchRegexp(pattern string, tmpVars map[string]string, line string) (bool, error) { + var re = regexp.MustCompile(`(?mi)` + pattern) + + groupNames := re.SubexpNames() + for _, match := range re.FindAllStringSubmatch(line, -1) { + for groupIdx, group := range match { + name := groupNames[groupIdx] + if name == "" { + name = "raw" + } + tmpVars[name] = group + } + } + + return true, nil +} + // onLinesMatched process vars into release func (a *announceProcessor) onLinesMatched(def *domain.IndexerDefinition, vars map[string]string, rls *domain.Release) error { - + // map variables from regex capture onto release struct if err := rls.MapVars(def, vars); err != nil { - a.log.Error().Stack().Err(err).Msg("announce: could not map vars for release") + a.log.Error().Err(err).Msg("announce: could not map vars for release") return err } @@ -173,12 +197,38 @@ func (a *announceProcessor) onLinesMatched(def *domain.IndexerDefinition, vars m // run before ParseMatch to not potentially use a reconstructed TorrentName rls.ParseString(rls.TorrentName) + // set baseUrl to default domain + baseUrl := def.URLS[0] + + // override baseUrl + if def.BaseURL != "" { + baseUrl = def.BaseURL + } + + // merge vars from regex captures on announce and vars from settings + mergedVars := mergeVars(vars, def.SettingsMap) + // parse torrentUrl - if err := def.Parse.ParseMatch(vars, def.SettingsMap, rls); err != nil { - a.log.Error().Stack().Err(err).Msgf("announce: %v", err) + matched, err := def.IRC.Parse.ParseMatch(baseUrl, mergedVars) + if err != nil { + a.log.Error().Err(err).Msgf("announce: %v", err) return err } + if matched != nil { + rls.TorrentURL = matched.TorrentURL + + // only used by few indexers + if matched.TorrentName != "" { + rls.TorrentName = matched.TorrentName + } + } + + // handle optional cookies + if v, ok := def.SettingsMap["cookie"]; ok { + rls.RawCookie = v + } + return nil } @@ -191,20 +241,16 @@ func (a *announceProcessor) processTorrentUrl(match string, vars map[string]stri } // merge extra vars with vars - if extraVars != nil { - for k, v := range extraVars { - tmpVars[k] = v - } + for k, v := range extraVars { + tmpVars[k] = v } // handle url encode of values - if encode != nil { - for _, e := range encode { - if v, ok := tmpVars[e]; ok { - // url encode value - t := url.QueryEscape(v) - tmpVars[e] = t - } + for _, e := range encode { + if v, ok := tmpVars[e]; ok { + // url encode value + t := url.QueryEscape(v) + tmpVars[e] = t } } @@ -226,6 +272,19 @@ func (a *announceProcessor) processTorrentUrl(match string, vars map[string]stri return b.String(), nil } +// mergeVars merge maps +func mergeVars(data ...map[string]string) map[string]string { + tmpVars := map[string]string{} + + for _, vars := range data { + // copy vars to new tmp map + for k, v := range vars { + tmpVars[k] = v + } + } + return tmpVars +} + func removeElement(s []string, i int) ([]string, error) { // s is [1,2,3,4,5,6], i is 2 @@ -246,7 +305,6 @@ func regExMatch(pattern string, value string) ([]string, error) { rxp, err := regexp.Compile(pattern) if err != nil { return nil, err - //return errors.Wrapf(err, "invalid regex: %s", value) } matches := rxp.FindStringSubmatch(value) diff --git a/internal/database/indexer.go b/internal/database/indexer.go index 08c9e75..b87fbc5 100644 --- a/internal/database/indexer.go +++ b/internal/database/indexer.go @@ -32,15 +32,14 @@ func (r *IndexerRepo) Store(ctx context.Context, indexer domain.Indexer) (*domai } queryBuilder := r.db.squirrel. - Insert("indexer").Columns("enabled", "name", "identifier", "implementation", "settings"). - Values(indexer.Enabled, indexer.Name, indexer.Identifier, indexer.Implementation, settings). + Insert("indexer").Columns("enabled", "name", "identifier", "implementation", "base_url", "settings"). + Values(indexer.Enabled, indexer.Name, indexer.Identifier, indexer.Implementation, indexer.BaseURL, settings). Suffix("RETURNING id").RunWith(r.db.handler) // return values var retID int64 - err = queryBuilder.QueryRowContext(ctx).Scan(&retID) - if err != nil { + if err = queryBuilder.QueryRowContext(ctx).Scan(&retID); err != nil { return nil, errors.Wrap(err, "error executing query") } @@ -59,6 +58,7 @@ func (r *IndexerRepo) Update(ctx context.Context, indexer domain.Indexer) (*doma Update("indexer"). Set("enabled", indexer.Enabled). Set("name", indexer.Name). + Set("base_url", indexer.BaseURL). Set("settings", settings). Set("updated_at", time.Now().Format(time.RFC3339)). Where("id = ?", indexer.ID) @@ -68,8 +68,7 @@ func (r *IndexerRepo) Update(ctx context.Context, indexer domain.Indexer) (*doma return nil, errors.Wrap(err, "error building query") } - _, err = r.db.handler.ExecContext(ctx, query, args...) - if err != nil { + if _, err = r.db.handler.ExecContext(ctx, query, args...); err != nil { return nil, errors.Wrap(err, "error executing query") } @@ -77,7 +76,7 @@ func (r *IndexerRepo) Update(ctx context.Context, indexer domain.Indexer) (*doma } func (r *IndexerRepo) List(ctx context.Context) ([]domain.Indexer, error) { - rows, err := r.db.handler.QueryContext(ctx, "SELECT id, enabled, name, identifier, implementation, settings FROM indexer ORDER BY name ASC") + rows, err := r.db.handler.QueryContext(ctx, "SELECT id, enabled, name, identifier, implementation, base_url, settings FROM indexer ORDER BY name ASC") if err != nil { return nil, errors.Wrap(err, "error executing query") } @@ -88,18 +87,18 @@ func (r *IndexerRepo) List(ctx context.Context) ([]domain.Indexer, error) { for rows.Next() { var f domain.Indexer - var implementation sql.NullString + var implementation, baseURL sql.NullString var settings string var settingsMap map[string]string - if err := rows.Scan(&f.ID, &f.Enabled, &f.Name, &f.Identifier, &implementation, &settings); err != nil { + if err := rows.Scan(&f.ID, &f.Enabled, &f.Name, &f.Identifier, &implementation, &baseURL, &settings); err != nil { return nil, errors.Wrap(err, "error scanning row") } f.Implementation = implementation.String + f.BaseURL = baseURL.String - err = json.Unmarshal([]byte(settings), &settingsMap) - if err != nil { + if err = json.Unmarshal([]byte(settings), &settingsMap); err != nil { return nil, errors.Wrap(err, "error unmarshal settings") } @@ -116,7 +115,7 @@ func (r *IndexerRepo) List(ctx context.Context) ([]domain.Indexer, error) { func (r *IndexerRepo) FindByID(ctx context.Context, id int) (*domain.Indexer, error) { queryBuilder := r.db.squirrel. - Select("id", "enabled", "name", "identifier", "implementation", "settings"). + Select("id", "enabled", "name", "identifier", "implementation", "base_url", "settings"). From("indexer"). Where("id = ?", id) @@ -132,13 +131,14 @@ func (r *IndexerRepo) FindByID(ctx context.Context, id int) (*domain.Indexer, er var i domain.Indexer - var implementation, settings sql.NullString + var implementation, baseURL, settings sql.NullString - if err := row.Scan(&i.ID, &i.Enabled, &i.Name, &i.Identifier, &implementation, &settings); err != nil { + if err := row.Scan(&i.ID, &i.Enabled, &i.Name, &i.Identifier, &implementation, &baseURL, &settings); err != nil { return nil, errors.Wrap(err, "error scanning row") } i.Implementation = implementation.String + i.BaseURL = baseURL.String var settingsMap map[string]string if err = json.Unmarshal([]byte(settings.String), &settingsMap); err != nil { @@ -153,7 +153,7 @@ func (r *IndexerRepo) FindByID(ctx context.Context, id int) (*domain.Indexer, er func (r *IndexerRepo) FindByFilterID(ctx context.Context, id int) ([]domain.Indexer, error) { queryBuilder := r.db.squirrel. - Select("id", "enabled", "name", "identifier", "settings"). + Select("id", "enabled", "name", "identifier", "base_url", "settings"). From("indexer"). Join("filter_indexer ON indexer.id = filter_indexer.indexer_id"). Where("filter_indexer.filter_id = ?", id) @@ -176,16 +176,17 @@ func (r *IndexerRepo) FindByFilterID(ctx context.Context, id int) ([]domain.Inde var settings string var settingsMap map[string]string + var baseURL sql.NullString - if err := rows.Scan(&f.ID, &f.Enabled, &f.Name, &f.Identifier, &settings); err != nil { + if err := rows.Scan(&f.ID, &f.Enabled, &f.Name, &f.Identifier, &baseURL, &settings); err != nil { return nil, errors.Wrap(err, "error scanning row") } - err = json.Unmarshal([]byte(settings), &settingsMap) - if err != nil { + if err = json.Unmarshal([]byte(settings), &settingsMap); err != nil { return nil, errors.Wrap(err, "error unmarshal settings") } + f.BaseURL = baseURL.String f.Settings = settingsMap indexers = append(indexers, f) diff --git a/internal/database/postgres_migrate.go b/internal/database/postgres_migrate.go index b567dc6..1117cb7 100644 --- a/internal/database/postgres_migrate.go +++ b/internal/database/postgres_migrate.go @@ -16,6 +16,7 @@ CREATE TABLE indexer id SERIAL PRIMARY KEY, identifier TEXT, implementation TEXT, + base_url TEXT, enabled BOOLEAN, name TEXT NOT NULL, settings TEXT, @@ -615,4 +616,7 @@ CREATE INDEX indexer_identifier_index UPDATE irc_network SET auth_mechanism = 'SASL_PLAIN';`, + `ALTER TABLE indexer + ADD COLUMN base_url TEXT; + `, } diff --git a/internal/database/sqlite_migrate.go b/internal/database/sqlite_migrate.go index 4f421d6..7a7b8db 100644 --- a/internal/database/sqlite_migrate.go +++ b/internal/database/sqlite_migrate.go @@ -16,6 +16,7 @@ CREATE TABLE indexer id INTEGER PRIMARY KEY, identifier TEXT, implementation TEXT, + base_url TEXT, enabled BOOLEAN, name TEXT NOT NULL, settings TEXT, @@ -959,4 +960,7 @@ DROP TABLE irc_network; ALTER TABLE irc_network_dg_tmp RENAME TO irc_network; `, + `ALTER TABLE indexer + ADD COLUMN base_url TEXT; + `, } diff --git a/internal/domain/indexer.go b/internal/domain/indexer.go index 9d42b0e..9303125 100644 --- a/internal/domain/indexer.go +++ b/internal/domain/indexer.go @@ -3,10 +3,11 @@ package domain import ( "bytes" "context" - "errors" "net/url" "text/template" + "github.com/autobrr/autobrr/pkg/errors" + "github.com/Masterminds/sprig/v3" "github.com/dustin/go-humanize" ) @@ -26,6 +27,7 @@ type Indexer struct { Identifier string `json:"identifier"` Enabled bool `json:"enabled"` Implementation string `json:"implementation"` + BaseURL string `json:"base_url,omitempty"` Settings map[string]string `json:"settings,omitempty"` } @@ -34,6 +36,7 @@ type IndexerDefinition struct { Name string `json:"name"` Identifier string `json:"identifier"` Implementation string `json:"implementation"` + BaseURL string `json:"base_url,omitempty"` Enabled bool `json:"enabled,omitempty"` Description string `json:"description"` Language string `json:"language"` @@ -46,7 +49,6 @@ type IndexerDefinition struct { IRC *IndexerIRC `json:"irc,omitempty"` Torznab *Torznab `json:"torznab,omitempty"` RSS *FeedSettings `json:"rss,omitempty"` - Parse *IndexerParse `json:"parse,omitempty"` } func (i IndexerDefinition) HasApi() bool { @@ -58,6 +60,55 @@ func (i IndexerDefinition) HasApi() bool { return false } +type IndexerDefinitionCustom struct { + ID int `json:"id,omitempty"` + Name string `json:"name"` + Identifier string `json:"identifier"` + Implementation string `json:"implementation"` + BaseURL string `json:"base_url,omitempty"` + Enabled bool `json:"enabled,omitempty"` + Description string `json:"description"` + Language string `json:"language"` + Privacy string `json:"privacy"` + Protocol string `json:"protocol"` + URLS []string `json:"urls"` + Supports []string `json:"supports"` + Settings []IndexerSetting `json:"settings,omitempty"` + SettingsMap map[string]string `json:"-"` + IRC *IndexerIRC `json:"irc,omitempty"` + Torznab *Torznab `json:"torznab,omitempty"` + RSS *FeedSettings `json:"rss,omitempty"` + Parse *IndexerIRCParse `json:"parse,omitempty"` +} + +func (i *IndexerDefinitionCustom) ToIndexerDefinition() *IndexerDefinition { + d := &IndexerDefinition{ + ID: i.ID, + Name: i.Name, + Identifier: i.Identifier, + Implementation: i.Implementation, + BaseURL: i.BaseURL, + Enabled: i.Enabled, + Description: i.Description, + Language: i.Language, + Privacy: i.Privacy, + Protocol: i.Protocol, + URLS: i.URLS, + Supports: i.Supports, + Settings: i.Settings, + SettingsMap: i.SettingsMap, + IRC: i.IRC, + Torznab: i.Torznab, + RSS: i.RSS, + } + + if i.IRC != nil && i.Parse != nil { + i.IRC.Parse = i.Parse + } + + return d +} + type IndexerSetting struct { Name string `json:"name"` Required bool `json:"required,omitempty"` @@ -89,6 +140,7 @@ type IndexerIRC struct { Announcers []string `json:"announcers"` SettingsMap map[string]string `json:"-"` Settings []IndexerSetting `json:"settings"` + Parse *IndexerIRCParse `json:"parse,omitempty"` } func (i IndexerIRC) ValidAnnouncer(announcer string) bool { @@ -109,48 +161,39 @@ func (i IndexerIRC) ValidChannel(channel string) bool { return false } -type IndexerParse struct { +type IndexerIRCParse struct { Type string `json:"type"` ForceSizeUnit string `json:"forcesizeunit"` - Lines []IndexerParseExtract `json:"lines"` - Match IndexerParseMatch `json:"match"` + Lines []IndexerIRCParseLine `json:"lines"` + Match IndexerIRCParseMatch `json:"match"` } -type IndexerParseExtract struct { +type IndexerIRCParseLine struct { Test []string `json:"test"` Pattern string `json:"pattern"` Vars []string `json:"vars"` } -type IndexerParseMatch struct { +type IndexerIRCParseMatch struct { TorrentURL string `json:"torrenturl"` TorrentName string `json:"torrentname"` Encode []string `json:"encode"` } -func (p *IndexerParse) ParseMatch(vars map[string]string, extraVars map[string]string, release *Release) error { - tmpVars := map[string]string{} +type IndexerIRCParseMatched struct { + TorrentURL string + TorrentName string +} - // copy vars to new tmp map - for k, v := range vars { - tmpVars[k] = v - } - - // merge extra vars with vars - if extraVars != nil { - for k, v := range extraVars { - tmpVars[k] = v - } - } +func (p *IndexerIRCParse) ParseMatch(baseURL string, vars map[string]string) (*IndexerIRCParseMatched, error) { + matched := &IndexerIRCParseMatched{} // handle url encode of values - if p.Match.Encode != nil { - for _, e := range p.Match.Encode { - if v, ok := tmpVars[e]; ok { - // url encode value - t := url.QueryEscape(v) - tmpVars[e] = t - } + for _, e := range p.Match.Encode { + if v, ok := vars[e]; ok { + // url encode value + t := url.QueryEscape(v) + vars[e] = t } } @@ -158,38 +201,52 @@ func (p *IndexerParse) ParseMatch(vars map[string]string, extraVars map[string]s // setup text template to inject variables into tmpl, err := template.New("torrenturl").Funcs(sprig.TxtFuncMap()).Parse(p.Match.TorrentURL) if err != nil { - return errors.New("could not create torrent url template") + return nil, errors.New("could not create torrent url template") } var urlBytes bytes.Buffer - if err := tmpl.Execute(&urlBytes, &tmpVars); err != nil { - return errors.New("could not write torrent url template output") + if err := tmpl.Execute(&urlBytes, &vars); err != nil { + return nil, errors.New("could not write torrent url template output") } - release.TorrentURL = urlBytes.String() + parsedUrl, err := url.Parse(urlBytes.String()) + if err != nil { + return nil, err + } + + // for backwards compatibility remove Host and Scheme to rebuild url + if parsedUrl.Host != "" { + parsedUrl.Host = "" + } + if parsedUrl.Scheme != "" { + parsedUrl.Scheme = "" + } + + // join baseURL with query + torrentURL, err := url.JoinPath(baseURL, parsedUrl.Path) + if err != nil { + return nil, errors.Wrap(err, "could not join torrent url") + } + + matched.TorrentURL = torrentURL } if p.Match.TorrentName != "" { // setup text template to inject variables into tmplName, err := template.New("torrentname").Funcs(sprig.TxtFuncMap()).Parse(p.Match.TorrentName) if err != nil { - return err + return nil, err } var nameBytes bytes.Buffer - if err := tmplName.Execute(&nameBytes, &tmpVars); err != nil { - return errors.New("could not write torrent name template output") + if err := tmplName.Execute(&nameBytes, &vars); err != nil { + return nil, errors.New("could not write torrent name template output") } - release.TorrentName = nameBytes.String() + matched.TorrentName = nameBytes.String() } - // handle cookies - if v, ok := extraVars["cookie"]; ok { - release.RawCookie = v - } - - return nil + return matched, nil } type TorrentBasic struct { diff --git a/internal/domain/indexer_test.go b/internal/domain/indexer_test.go index cac4584..f2f77f3 100644 --- a/internal/domain/indexer_test.go +++ b/internal/domain/indexer_test.go @@ -6,23 +6,22 @@ import ( "github.com/stretchr/testify/assert" ) -func TestIndexerParse_ParseMatch(t *testing.T) { +func TestIndexerIRCParse_ParseMatch(t *testing.T) { type fields struct { Type string ForceSizeUnit string - Lines []IndexerParseExtract - Match IndexerParseMatch + Lines []IndexerIRCParseLine + Match IndexerIRCParseMatch } type args struct { - vars map[string]string - extraVars map[string]string - release *Release + baseURL string + vars map[string]string } tests := []struct { name string fields fields args args - expect *Release + want *IndexerIRCParseMatched wantErr bool }{ { @@ -30,7 +29,7 @@ func TestIndexerParse_ParseMatch(t *testing.T) { fields: fields{ Type: "", ForceSizeUnit: "", - Lines: []IndexerParseExtract{ + Lines: []IndexerIRCParseLine{ { Test: nil, Pattern: "New Torrent Announcement:\\s*<([^>]*)>\\s*Name:'(.*)' uploaded by '([^']*)'\\s*(freeleech)*\\s*-\\s*(https?\\:\\/\\/[^\\/]+\\/)torrent\\/(\\d+)", @@ -44,39 +43,25 @@ func TestIndexerParse_ParseMatch(t *testing.T) { }, }, }, - Match: IndexerParseMatch{ - TorrentURL: "{{ .baseUrl }}rss/download/{{ .torrentId }}/{{ .rsskey }}/{{ .torrentName }}.torrent", - TorrentName: "", - Encode: []string{"torrentName"}, + Match: IndexerIRCParseMatch{ + TorrentURL: "rss/download/{{ .torrentId }}/{{ .rsskey }}/{{ .torrentName }}.torrent", + Encode: []string{"torrentName"}, }, }, args: args{ + baseURL: "https://mock.local/", vars: map[string]string{ "category": "TV :: Episodes HD", "torrentName": "The Show 2019 S03E08 2160p DV WEBRip 6CH x265 HEVC-GROUP", "uploader": "Anonymous", "freeleech": "", - "baseUrl": "https://mock.org/", + "baseUrl": "https://mock.local/", "torrentId": "240860011", - }, - extraVars: map[string]string{ - "rsskey": "00000000000000000000", - }, - release: &Release{ - Indexer: "mock", - FilterStatus: ReleaseStatusFilterPending, - Rejections: []string{}, - Protocol: ReleaseProtocolTorrent, - Implementation: ReleaseImplementationIRC, + "rsskey": "00000000000000000000", }, }, - expect: &Release{ - Indexer: "mock", - FilterStatus: ReleaseStatusFilterPending, - Rejections: []string{}, - Protocol: ReleaseProtocolTorrent, - Implementation: ReleaseImplementationIRC, - TorrentURL: "https://mock.org/rss/download/240860011/00000000000000000000/The+Show+2019+S03E08+2160p+DV+WEBRip+6CH+x265+HEVC-GROUP.torrent", + want: &IndexerIRCParseMatched{ + TorrentURL: "https://mock.local/rss/download/240860011/00000000000000000000/The+Show+2019+S03E08+2160p+DV+WEBRip+6CH+x265+HEVC-GROUP.torrent", }, wantErr: false, }, @@ -85,7 +70,7 @@ func TestIndexerParse_ParseMatch(t *testing.T) { fields: fields{ Type: "", ForceSizeUnit: "", - Lines: []IndexerParseExtract{ + Lines: []IndexerIRCParseLine{ { Test: nil, Pattern: `(.*?)(?: - )?(Visual Novel|Light Novel|TV.*|Movie|Manga|OVA|ONA|DVD Special|BD Special|Oneshot|Anthology|Manhwa|Manhua|Artbook|Game|Live Action.*|)[\s\p{Zs}]{2,}\[(\d+)\] :: (.*?)(?: \/ (?:RAW|Softsubs|Hardsubs|Translated)\s\((.+)\)(?:.*Episode\s(\d+))?(?:.*(Freeleech))?.*)? \|\| (https.*)\/torrents.*\?id=\d+&torrentid=(\d+) \|\| (.+?(?:(?:\|\| Uploaded by|$))?) (?:\|\| Uploaded by: (.*))?$`, @@ -104,13 +89,14 @@ func TestIndexerParse_ParseMatch(t *testing.T) { }, }, }, - Match: IndexerParseMatch{ - TorrentURL: "{{ .baseUrl }}/torrent/{{ .torrentId }}/download/{{ .passkey }}", + Match: IndexerIRCParseMatch{ + TorrentURL: "/torrent/{{ .torrentId }}/download/{{ .passkey }}", TorrentName: `{{ if .releaseGroup }}[{{ .releaseGroup }}] {{ end }}{{ .torrentName }} [{{ .year }}] {{ if .releaseEpisode }}{{ printf "- %02s " .releaseEpisode }}{{ end }}{{ print "[" .releaseTags "]" | replace " / " "][" }}`, Encode: nil, }, }, args: args{ + baseURL: "https://mock.local/", vars: map[string]string{ "torrentName": "Great BluRay SoftSubbed Anime", "category": "TV Series", @@ -119,45 +105,113 @@ func TestIndexerParse_ParseMatch(t *testing.T) { "releaseGroup": "Softsubs", "releaseEpisode": "", "freeleech": "freeleech", - "baseUrl": "https://mock.org", + "baseUrl": "https://mock.local", "torrentId": "240860011", "tags": "comedy, drama, school.life, sports", "uploader": "Uploader", - }, - extraVars: map[string]string{ - "passkey": "00000000000000000000", - }, - release: &Release{ - Indexer: "mock", - FilterStatus: ReleaseStatusFilterPending, - Rejections: []string{}, - Protocol: ReleaseProtocolTorrent, - Implementation: ReleaseImplementationIRC, + "passkey": "00000000000000000000", }, }, - expect: &Release{ - Indexer: "mock", - FilterStatus: ReleaseStatusFilterPending, - Rejections: []string{}, - Protocol: ReleaseProtocolTorrent, - Implementation: ReleaseImplementationIRC, - TorrentURL: "https://mock.org/torrent/240860011/download/00000000000000000000", - TorrentName: "[Softsubs] Great BluRay SoftSubbed Anime [2020] [Blu-ray][MKV][h264 10-bit][1080p][FLAC 2.0][Dual Audio][Softsubs (Sub Group)][Freeleech]", + want: &IndexerIRCParseMatched{ + TorrentURL: "https://mock.local/torrent/240860011/download/00000000000000000000", + TorrentName: "[Softsubs] Great BluRay SoftSubbed Anime [2020] [Blu-ray][MKV][h264 10-bit][1080p][FLAC 2.0][Dual Audio][Softsubs (Sub Group)][Freeleech]", + }, + wantErr: false, + }, + { + name: "test_03", + fields: fields{ + Type: "", + ForceSizeUnit: "", + Lines: []IndexerIRCParseLine{ + { + Test: nil, + Pattern: "New Torrent Announcement:\\s*<([^>]*)>\\s*Name:'(.*)' uploaded by '([^']*)'\\s*(freeleech)*\\s*-\\s*(https?\\:\\/\\/[^\\/]+\\/)torrent\\/(\\d+)", + Vars: []string{ + "category", + "torrentName", + "uploader", + "freeleech", + "baseUrl", + "torrentId", + }, + }, + }, + Match: IndexerIRCParseMatch{ + TorrentURL: "{{ .baseUrl }}rss/download/{{ .torrentId }}/{{ .rsskey }}/{{ .torrentName }}.torrent", + Encode: []string{"torrentName"}, + }, + }, + args: args{ + baseURL: "https://mock.local/", + vars: map[string]string{ + "category": "TV :: Episodes HD", + "torrentName": "The Show 2019 S03E08 2160p DV WEBRip 6CH x265 HEVC-GROUP", + "uploader": "Anonymous", + "freeleech": "", + "baseUrl": "https://mock.local/", + "torrentId": "240860011", + "rsskey": "00000000000000000000", + }, + }, + want: &IndexerIRCParseMatched{ + TorrentURL: "https://mock.local/rss/download/240860011/00000000000000000000/The+Show+2019+S03E08+2160p+DV+WEBRip+6CH+x265+HEVC-GROUP.torrent", + }, + wantErr: false, + }, + { + name: "test_04", + fields: fields{ + Type: "", + ForceSizeUnit: "", + Lines: []IndexerIRCParseLine{ + { + Test: nil, + Pattern: "New Torrent Announcement:\\s*<([^>]*)>\\s*Name:'(.*)' uploaded by '([^']*)'\\s*(freeleech)*\\s*-\\s*(https?\\:\\/\\/[^\\/]+\\/)torrent\\/(\\d+)", + Vars: []string{ + "category", + "torrentName", + "uploader", + "freeleech", + "baseUrl", + "torrentId", + }, + }, + }, + Match: IndexerIRCParseMatch{ + TorrentURL: "https://mock.local/rss/download/{{ .torrentId }}/{{ .rsskey }}/{{ .torrentName }}.torrent", + Encode: []string{"torrentName"}, + }, + }, + args: args{ + baseURL: "https://mock.local/", + vars: map[string]string{ + "category": "TV :: Episodes HD", + "torrentName": "The Show 2019 S03E08 2160p DV WEBRip 6CH x265 HEVC-GROUP", + "uploader": "Anonymous", + "freeleech": "", + "baseUrl": "https://mock.local/", + "torrentId": "240860011", + "rsskey": "00000000000000000000", + }, + }, + want: &IndexerIRCParseMatched{ + TorrentURL: "https://mock.local/rss/download/240860011/00000000000000000000/The+Show+2019+S03E08+2160p+DV+WEBRip+6CH+x265+HEVC-GROUP.torrent", }, wantErr: false, }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - p := &IndexerParse{ + p := &IndexerIRCParse{ Type: tt.fields.Type, ForceSizeUnit: tt.fields.ForceSizeUnit, Lines: tt.fields.Lines, Match: tt.fields.Match, } - p.ParseMatch(tt.args.vars, tt.args.extraVars, tt.args.release) - assert.Equal(t, tt.expect, tt.args.release) + got, _ := p.ParseMatch(tt.args.baseURL, tt.args.vars) + assert.Equal(t, tt.want, got) }) } } diff --git a/internal/domain/release.go b/internal/domain/release.go index f0b84d9..4b2137e 100644 --- a/internal/domain/release.go +++ b/internal/domain/release.go @@ -219,8 +219,6 @@ func (r *Release) ParseString(title string) { } r.ParseReleaseTagsString(r.ReleaseTags) - - return } var ErrUnrecoverableError = errors.New("unrecoverable error") @@ -264,8 +262,6 @@ func (r *Release) ParseReleaseTagsString(tags string) { if r.AudioChannels == "" && t.Channels != "" { r.AudioChannels = t.Channels } - - return } func (r *Release) ParseSizeBytesString(size string) { @@ -401,7 +397,7 @@ func (r *Release) RejectionsString() string { return "" } -// MapVars better name +// MapVars map vars from regex captures to fields on release func (r *Release) MapVars(def *IndexerDefinition, varMap map[string]string) error { if torrentName, err := getStringMapValue(varMap, "torrentName"); err != nil { @@ -444,16 +440,12 @@ func (r *Release) MapVars(def *IndexerDefinition, varMap map[string]string) erro switch freeleechPercentInt { case 25: r.Bonus = append(r.Bonus, "Freeleech25") - break case 50: r.Bonus = append(r.Bonus, "Freeleech50") - break case 75: r.Bonus = append(r.Bonus, "Freeleech75") - break case 100: r.Bonus = append(r.Bonus, "Freeleech100") - break } } @@ -464,8 +456,8 @@ func (r *Release) MapVars(def *IndexerDefinition, varMap map[string]string) erro if torrentSize, err := getStringMapValue(varMap, "torrentSize"); err == nil { // handling for indexer who doesn't explicitly set which size unit is used like (AR) - if def.Parse != nil && def.Parse.ForceSizeUnit != "" { - torrentSize = fmt.Sprintf("%v %v", torrentSize, def.Parse.ForceSizeUnit) + if def.IRC != nil && def.IRC.Parse != nil && def.IRC.Parse.ForceSizeUnit != "" { + torrentSize = fmt.Sprintf("%v %v", torrentSize, def.IRC.Parse.ForceSizeUnit) } size, err := humanize.ParseBytes(torrentSize) diff --git a/internal/domain/release_test.go b/internal/domain/release_test.go index 7bbdac7..38e7d1e 100644 --- a/internal/domain/release_test.go +++ b/internal/domain/release_test.go @@ -449,7 +449,7 @@ func TestRelease_MapVars(t *testing.T) { "torrentSize": "10000", "tags": "hip.hop,rhythm.and.blues, 2000s", }, - definition: IndexerDefinition{Parse: &IndexerParse{ForceSizeUnit: "MB"}}, + definition: IndexerDefinition{IRC: &IndexerIRC{Parse: &IndexerIRCParse{ForceSizeUnit: "MB"}}}, }, }, { @@ -769,10 +769,7 @@ func TestRelease_DownloadTorrentFile(t *testing.T) { TorrentURL: fmt.Sprintf("%v/%v", ts.URL, 401), }, wantErr: func(t assert.TestingT, err error, i ...interface{}) bool { - if err != nil { - return true - } - return false + return err != nil }, }, { @@ -783,10 +780,7 @@ func TestRelease_DownloadTorrentFile(t *testing.T) { TorrentURL: fmt.Sprintf("%v/%v", ts.URL, 403), }, wantErr: func(t assert.TestingT, err error, i ...interface{}) bool { - if err != nil { - return true - } - return false + return err != nil }, }, { @@ -797,13 +791,11 @@ func TestRelease_DownloadTorrentFile(t *testing.T) { TorrentURL: fmt.Sprintf("%v/%v", ts.URL, "file.torrent"), }, wantErr: func(t assert.TestingT, err error, i ...interface{}) bool { - if err != nil { - return true - } - return false + return err != nil }, }, } + for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { r := &Release{ @@ -861,7 +853,7 @@ func TestRelease_DownloadTorrentFile(t *testing.T) { Filter: tt.fields.Filter, ActionStatus: tt.fields.ActionStatus, } - tt.wantErr(t, r.DownloadTorrentFile(), fmt.Sprintf("DownloadTorrentFile()")) + tt.wantErr(t, r.DownloadTorrentFile(), "DownloadTorrentFile()") }) } } diff --git a/internal/indexer/definitions/acidlounge.yaml b/internal/indexer/definitions/acidlounge.yaml index 2700ad5..3468b43 100644 --- a/internal/indexer/definitions/acidlounge.yaml +++ b/internal/indexer/definitions/acidlounge.yaml @@ -5,7 +5,7 @@ identifier: acidlounge description: Small general tracker. language: en-us urls: - - https://www.acid-lounge.org.uk + - https://www.acid-lounge.org.uk/ privacy: private protocol: torrent supports: @@ -55,21 +55,21 @@ irc: label: NickServ Password help: NickServ password -parse: - type: single - lines: - - test: - - "(Games/PC) The.Smallest.Game-ze0s https://www.acid-lounge.org.uk/details.php?id=3443&hit=1" - - "(Music/MP3) TUNES_4_LYFE_WEB_iNT https://www.acid-lounge.org.uk/details.php?id=30104&hit=1" - - "(XXX/0-Day) Cute.Stuff.69.XXX.VR180.2700p.MP4-s0ez https://www.acid-lounge.org.uk/details.php?id=30444221135&hit=1" - - "(Movies/HD) Have.You.Seen.The.Cat.Tonight-WhereThat https://www.acid-lounge.org.uk/details.php?id=3018979898&hit=1" - - "(TV-HD/X264) The.Eggerton.S01E01.720p.WEB.h264-OTA https://www.acid-lounge.org.uk/details.php?id=302099&hit=1" - pattern: '\((.*)\) (.*) (https?\:\/\/[^\/]+).*id=(\d+)' - vars: - - category - - torrentName - - baseUrl - - torrentId + parse: + type: single + lines: + - test: + - "(Games/PC) The.Smallest.Game-ze0s https://www.acid-lounge.org.uk/details.php?id=3443&hit=1" + - "(Music/MP3) TUNES_4_LYFE_WEB_iNT https://www.acid-lounge.org.uk/details.php?id=30104&hit=1" + - "(XXX/0-Day) Cute.Stuff.69.XXX.VR180.2700p.MP4-s0ez https://www.acid-lounge.org.uk/details.php?id=30444221135&hit=1" + - "(Movies/HD) Have.You.Seen.The.Cat.Tonight-WhereThat https://www.acid-lounge.org.uk/details.php?id=3018979898&hit=1" + - "(TV-HD/X264) The.Eggerton.S01E01.720p.WEB.h264-OTA https://www.acid-lounge.org.uk/details.php?id=302099&hit=1" + pattern: '\((.*)\) (.*) (https?\:\/\/[^\/]+\/).*id=(\d+)' + vars: + - category + - torrentName + - baseUrl + - torrentId - match: - torrenturl: "{{ .baseUrl }}/rssdownload.php?passkey={{ .passkey }}&uid={{ .uid }}&tid={{ .torrentId }}" + match: + torrenturl: "/rssdownload.php?passkey={{ .passkey }}&uid={{ .uid }}&tid={{ .torrentId }}" diff --git a/internal/indexer/definitions/alpharatio.yaml b/internal/indexer/definitions/alpharatio.yaml index 8e99afe..1e6fe8e 100644 --- a/internal/indexer/definitions/alpharatio.yaml +++ b/internal/indexer/definitions/alpharatio.yaml @@ -60,27 +60,27 @@ irc: label: Invite command help: Invite auth with Voyager. Replace USERNAME with site nick and set IRCKEY. -parse: - type: multi - forcesizeunit: MB - lines: - - test: - - "[New Release]-[MovieHD]-[That.Movie.2017.INTERNAL.1080p.BluRay.CRF.x264-GROUP]-[URL]-[ https://alpharatio.cc/torrents.php?id=000000 ]-[ 000000 ]-[ Uploaded 2 Mins, 59 Secs after pre. ]" - pattern: \[New Release\]-\[(.*)\]-\[(.*)\]-\[URL\]-\[ (https?://.*)id=\d+ \]-\[ (\d+) \](?:-\[ Uploaded (.*) after pre. ])? - vars: - - category - - torrentName - - baseUrl - - torrentId - - preTime - - test: - - "[AutoDL]-[MovieHD]-[000000]-[ 1 | 10659 | 1 | 1 ]-[That.Movie.2017.INTERNAL.1080p.BluRay.CRF.x264-GROUP]" - pattern: \[AutoDL\]-\[.*\]-\[.*\]-\[ ([01]) \| (\d+) \| ([01]) \| ([01]) \]-\[.+\] - vars: - - scene - - torrentSize - - freeleech - - auto + parse: + type: multi + forcesizeunit: MB + lines: + - test: + - "[new release]-[moviehd]-[that.movie.2017.internal.1080p.bluray.crf.x264-group]-[url]-[ https://alpharatio.cc/torrents.php?id=000000 ]-[ 000000 ]-[ uploaded 2 mins, 59 secs after pre. ]" + pattern: \[new release\]-\[(.*)\]-\[(.*)\]-\[url\]-\[ (https?://.+/).+id=\d+ \]-\[ (\d+) \](?:-\[ uploaded (.*) after pre. ])? + vars: + - category + - torrentName + - baseUrl + - torrentId + - preTime + - test: + - "[AutoDL]-[MovieHD]-[000000]-[ 1 | 10659 | 1 | 1 ]-[That.Movie.2017.INTERNAL.1080p.BluRay.CRF.x264-GROUP]" + pattern: \[AutoDL\]-\[.*\]-\[.*\]-\[ ([01]) \| (\d+) \| ([01]) \| ([01]) \]-\[.+\] + vars: + - scene + - torrentSize + - freeleech + - auto - match: - torrenturl: "{{ .baseUrl }}action=download&id={{ .torrentId }}&authkey={{ .authkey }}&torrent_pass={{ .torrent_pass }}" + match: + torrenturl: "/torrents.php?action=download&id={{ .torrentId }}&authkey={{ .authkey }}&torrent_pass={{ .torrent_pass }}" diff --git a/internal/indexer/definitions/animebytes.yaml b/internal/indexer/definitions/animebytes.yaml index eaffc5d..cf607fc 100644 --- a/internal/indexer/definitions/animebytes.yaml +++ b/internal/indexer/definitions/animebytes.yaml @@ -54,33 +54,33 @@ irc: label: Invite command help: Invite auth with Satsuki, animebytes.tv/irc. Replace USERNAME and IRCKEY. -parse: - type: single - lines: - - test: - - "Awesome Raw Novel - Light Novel [2005] :: Raw / EPUB || https://animebytes.tv/torrents.php?id=00000&torrentid=00000 || supernatural || Uploaded by: Test-Uploader" - - "Awesome Translated Novel - Light Novel [2018] :: Translated (Translation Group) / EPUB || https://animebytes.tv/torrents.php?id=00000&torrentid=000000 || adventure, comedy, fantasy, harem, school.life, magic, action || Uploaded by: UPLOADER" - - "Great BluRay SoftSubbed Anime - TV Series [2020] :: Blu-ray / MKV / h264 10-bit / 1080p / FLAC 2.0 / Dual Audio / Softsubs (Sub Group) / Freeleech || https://animebytes.tv/torrents.php?id=00008&torrentid=000000 || comedy, drama, school.life, sports || Uploaded by: Uploader" - - "Awesome Translated Manga - Manga [2019] :: Translated (Translation Group) / Digital / Ongoing || https://animebytes.tv/torrents.php?id=00000&torrentid=000000 || comedy, fantasy, school.life, shounen, slice.of.life" - - "Cool Movie - Movie [2020] :: Blu-ray / MKV / h265 10-bit / 1929x804 / AC3 5.1 / Dual Audio / Softsubs (Sub Group) || https://animebytes.tv/torrents.php?id=000000&torrentid=0000000 || drama, romance, slice.of.life || Uploaded by: Anon-Uploader" - - "Awesome Live Action Special - Live Action TV Special [2021] :: Web / MKV / h264 / 848x480 / AAC 2.0 / Softsubs (Sub Group) || https://animebytes.tv/torrents.php?id=00000&torrentid=00000 || manga || Uploaded by: Some-Uploader" - - "Best Visual Novel - Visual Novel [2006] :: Game / PC / Unarchived / Hentai (Censored) || https://animebytes.tv/torrents.php?id=00000&torrentid=00000 || nukige || Uploaded by: Uploader" - - "Artist Name - Album of awesome Music [1991] :: MP3 / V0 (VBR) / CD || https://animebytes.tv/torrents2.php?id=00000&torrentid=000000 || ambient, folk || Uploaded by: Uploader" - - "Awesome Series - TV Series [2022] :: Web / MKV / h264 / 1080p / AAC 2.0 / Softsubs (Sub Group) / Episode 1 / Freeleech || https://animebytes.tv/torrents.php?id=00000&torrentid=000000 || || Uploaded by: Uploader" - pattern: '(.*?)(?: - )?(Visual Novel|Light Novel|TV.*|Movie|Manga|OVA|ONA|DVD Special|BD Special|Oneshot|Anthology|Manhwa|Manhua|Artbook|Game|Live Action.*|)[\s\p{Zs}]{2,}\[(\d+)\] :: (.*?)(?: \/ (?:RAW|Softsubs|Hardsubs|Translated)\s\((.+)\)(?:.*Episode\s(\d+))?(?:.*(Freeleech))?.*)?(?:.?\|\|.?)?(https.*)\/torrents.*\?id=\d+&torrentid=(\d+)(?:.?\|\|.?)?([A-Za-z,. ]+\w)?(?:.?\|\|.?)?(?:Uploaded by: (.*))?' - vars: - - torrentName - - category - - year - - releaseTags - - releaseGroup - - releaseEpisode - - freeleech - - baseUrl - - torrentId - - tags - - uploader + parse: + type: single + lines: + - test: + - "Awesome Raw Novel - Light Novel [2005] :: Raw / EPUB || https://animebytes.tv/torrents.php?id=00000&torrentid=00000 || supernatural || Uploaded by: Test-Uploader" + - "Awesome Translated Novel - Light Novel [2018] :: Translated (Translation Group) / EPUB || https://animebytes.tv/torrents.php?id=00000&torrentid=000000 || adventure, comedy, fantasy, harem, school.life, magic, action || Uploaded by: UPLOADER" + - "Great BluRay SoftSubbed Anime - TV Series [2020] :: Blu-ray / MKV / h264 10-bit / 1080p / FLAC 2.0 / Dual Audio / Softsubs (Sub Group) / Freeleech || https://animebytes.tv/torrents.php?id=00008&torrentid=000000 || comedy, drama, school.life, sports || Uploaded by: Uploader" + - "Awesome Translated Manga - Manga [2019] :: Translated (Translation Group) / Digital / Ongoing || https://animebytes.tv/torrents.php?id=00000&torrentid=000000 || comedy, fantasy, school.life, shounen, slice.of.life" + - "Cool Movie - Movie [2020] :: Blu-ray / MKV / h265 10-bit / 1929x804 / AC3 5.1 / Dual Audio / Softsubs (Sub Group) || https://animebytes.tv/torrents.php?id=000000&torrentid=0000000 || drama, romance, slice.of.life || Uploaded by: Anon-Uploader" + - "Awesome Live Action Special - Live Action TV Special [2021] :: Web / MKV / h264 / 848x480 / AAC 2.0 / Softsubs (Sub Group) || https://animebytes.tv/torrents.php?id=00000&torrentid=00000 || manga || Uploaded by: Some-Uploader" + - "Best Visual Novel - Visual Novel [2006] :: Game / PC / Unarchived / Hentai (Censored) || https://animebytes.tv/torrents.php?id=00000&torrentid=00000 || nukige || Uploaded by: Uploader" + - "Artist Name - Album of awesome Music [1991] :: MP3 / V0 (VBR) / CD || https://animebytes.tv/torrents2.php?id=00000&torrentid=000000 || ambient, folk || Uploaded by: Uploader" + - "Awesome Series - TV Series [2022] :: Web / MKV / h264 / 1080p / AAC 2.0 / Softsubs (Sub Group) / Episode 1 / Freeleech || https://animebytes.tv/torrents.php?id=00000&torrentid=000000 || || Uploaded by: Uploader" + pattern: '(.*?)(?: - )?(Visual Novel|Light Novel|TV.*|Movie|Manga|OVA|ONA|DVD Special|BD Special|Oneshot|Anthology|Manhwa|Manhua|Artbook|Game|Live Action.*|)[\s\p{Zs}]{2,}\[(\d+)\] :: (.*?)(?: \/ (?:RAW|Softsubs|Hardsubs|Translated)\s\((.+)\)(?:.*Episode\s(\d+))?(?:.*(Freeleech))?.*)?(?:.?\|\|.?)?(https.+\/)torrents.*\?id=\d+&torrentid=(\d+)(?:.?\|\|.?)?([A-Za-z,. ]+\w)?(?:.?\|\|.?)?(?:Uploaded by: (.*))?' + vars: + - torrentName + - category + - year + - releaseTags + - releaseGroup + - releaseEpisode + - freeleech + - baseUrl + - torrentId + - tags + - uploader - match: - torrenturl: "{{ .baseUrl }}/torrent/{{ .torrentId }}/download/{{ .passkey }}" - torrentname: "{{ if .releaseGroup }}[{{ .releaseGroup }}] {{ end }}{{ .torrentName }} {{ if .releaseEpisode }}{{ printf \"- %02s \" .releaseEpisode }}{{ end }} {{ if .year }}[{{ .year }}]{{ end }}{{ print \"[\" .releaseTags \"]\" | replace \" / \" \"][\" }}" + match: + torrenturl: "/torrent/{{ .torrentId }}/download/{{ .passkey }}" + torrentname: "{{ if .releaseGroup }}[{{ .releaseGroup }}] {{ end }}{{ .torrentName }} {{ if .releaseEpisode }}{{ printf \"- %02s \" .releaseEpisode }}{{ end }} {{ if .year }}[{{ .year }}]{{ end }}{{ print \"[\" .releaseTags \"]\" | replace \" / \" \"][\" }}" diff --git a/internal/indexer/definitions/beyondhd.yaml b/internal/indexer/definitions/beyondhd.yaml index 177ef43..6fb064d 100644 --- a/internal/indexer/definitions/beyondhd.yaml +++ b/internal/indexer/definitions/beyondhd.yaml @@ -55,19 +55,19 @@ irc: label: Invite command help: Invite auth with Millie. Replace IRCKEY. -parse: - type: single - lines: - - test: - - "New Torrent: That.Show.S01.1080p.Blu-ray.AVC.DTS-HD.MA.5.1-Test Category: TV By: Uploader Size: 137.73 GB Link: https://beyond-hd.me/details.php?id=00000" - pattern: 'New Torrent: (.*) Category: (.*) By: (.*) Size: (.*) Link: (https?\:\/\/[^\/]+\/).*[&\?]id=(\d+)' - vars: - - torrentName - - category - - uploader - - torrentSize - - baseUrl - - torrentId + parse: + type: single + lines: + - test: + - "New Torrent: That.Show.S01.1080p.Blu-ray.AVC.DTS-HD.MA.5.1-Test Category: TV By: Uploader Size: 137.73 GB Link: https://beyond-hd.me/details.php?id=00000" + pattern: 'New Torrent: (.*) Category: (.*) By: (.*) Size: (.*) Link: (https?\:\/\/[^\/]+\/).*[&\?]id=(\d+)' + vars: + - torrentName + - category + - uploader + - torrentSize + - baseUrl + - torrentId - match: - torrenturl: "{{ .baseUrl }}torrent/download/auto.{{ .torrentId }}.{{ .rsskey }}" + match: + torrenturl: "/torrent/download/auto.{{ .torrentId }}.{{ .rsskey }}" diff --git a/internal/indexer/definitions/bit-hdtv.yaml b/internal/indexer/definitions/bit-hdtv.yaml index 2d2041d..bc7094c 100644 --- a/internal/indexer/definitions/bit-hdtv.yaml +++ b/internal/indexer/definitions/bit-hdtv.yaml @@ -5,7 +5,7 @@ identifier: bithdtv description: Bit-HDTV (BHDTV) is a specialized HD tracker in movies and TV with so many daily uploads. language: en-us urls: - - https://www.bit-hdtv.com + - https://www.bit-hdtv.com/ privacy: private protocol: torrent supports: @@ -48,19 +48,19 @@ irc: label: NickServ Password help: NickServ password -parse: - type: single - lines: - - test: - - "New torrent: Fear.the.walking.bee.s01e01.720p.WEB.h264-lemoncakes | Cat.: TV | WEB-DL | 720p | Uploader: ze0s | https://www.bit-hdtv.com/details.php?id=448412837123" - - "New torrent: Y.r.u.there.2022.1080p.BluRay.DDP5.1.x264-egg | Cat.: Movies | Encode x264 | 1080p | Uploader: Anonymous | https://www.bit-hdtv.com/details.php?id=69" - pattern: 'New torrent: (.*) \|\s*Cat.: ([^\|]*) \| .* Uploader: (.*) \| (https?\:\/\/[^\/]+).*id=(\d+)' - vars: - - torrentName - - category - - uploader - - baseUrl - - torrentId + parse: + type: single + lines: + - test: + - "New torrent: Fear.the.walking.bee.s01e01.720p.WEB.h264-lemoncakes | Cat.: TV | WEB-DL | 720p | Uploader: ze0s | https://www.bit-hdtv.com/details.php?id=448412837123" + - "New torrent: Y.r.u.there.2022.1080p.BluRay.DDP5.1.x264-egg | Cat.: Movies | Encode x264 | 1080p | Uploader: Anonymous | https://www.bit-hdtv.com/details.php?id=69" + pattern: 'New torrent: (.*) \|\s*Cat.: ([^\|]*) \| .* Uploader: (.*) \| (https?\:\/\/[^\/]+\/).*id=(\d+)' + vars: + - torrentName + - category + - uploader + - baseUrl + - torrentId - match: - torrenturl: "{{ .baseUrl }}/rssdownload.php?id={{ .torrentId }}&passkey={{ .passkey }}" + match: + torrenturl: "/rssdownload.php?id={{ .torrentId }}&passkey={{ .passkey }}" diff --git a/internal/indexer/definitions/btfiles.yaml b/internal/indexer/definitions/btfiles.yaml index 743467a..4e3bd76 100644 --- a/internal/indexer/definitions/btfiles.yaml +++ b/internal/indexer/definitions/btfiles.yaml @@ -47,21 +47,21 @@ irc: label: NickServ Password help: NickServ password -parse: - type: single - lines: - - test: - - "[XXX » HD] Some.Porno.22.08.16.Famous.Actress.XXX.1080p.MP4-GROUP [ 3,00 GB | Pred 2022-08-16 08:47:31 (GMT) | URL: https://bittorrentfiles.me/details.php?id=0000000 ]" - - "[Music » Single] [Dance Hall] Artist-Album-WEB-2021-GROUP [ 63,09 MB | Pred 2022-08-16 08:58:06 (GMT) | URL: https://bittorrentfiles.me/details.php?id=0000000 ]" - - "[Sports » HD] Sports.League.2022.08.15.Team1.vs.Team2.720p.WEB.h264-GROUP [ 6,26 GB | Pred 2022-08-16 08:46:25 (GMT) | URL: https://bittorrentfiles.me/details.php?id=0000000 ]" - pattern: '\[(.*?)\] (?:\[(.*)\] )?(.*) \[ ([\d\.,]+ \w+) \| Pred .+ \| URL\: (https?\:\/\/[^\/]+)\/.*[&\?]id=(\d+) \]' - vars: - - category - - tags - - torrentName - - torrentSize - - baseUrl - - torrentId + parse: + type: single + lines: + - test: + - "[XXX » HD] Some.Porno.22.08.16.Famous.Actress.XXX.1080p.MP4-GROUP [ 3,00 GB | Pred 2022-08-16 08:47:31 (GMT) | URL: https://bittorrentfiles.me/details.php?id=0000000 ]" + - "[Music » Single] [Dance Hall] Artist-Album-WEB-2021-GROUP [ 63,09 MB | Pred 2022-08-16 08:58:06 (GMT) | URL: https://bittorrentfiles.me/details.php?id=0000000 ]" + - "[Sports » HD] Sports.League.2022.08.15.Team1.vs.Team2.720p.WEB.h264-GROUP [ 6,26 GB | Pred 2022-08-16 08:46:25 (GMT) | URL: https://bittorrentfiles.me/details.php?id=0000000 ]" + pattern: '\[(.*?)\] (?:\[(.*)\] )?(.*) \[ ([\d\.,]+ \w+) \| Pred .+ \| URL\: (https?\:\/\/[^\/]+\/).*[&\?]id=(\d+) \]' + vars: + - category + - tags + - torrentName + - torrentSize + - baseUrl + - torrentId - match: - torrenturl: "{{ .baseUrl }}/download.php?torrent={{ .torrentId }}&k={{ .rsskey }}&ssl=1" + match: + torrenturl: "/download.php?torrent={{ .torrentId }}&k={{ .rsskey }}&ssl=1" diff --git a/internal/indexer/definitions/btn.yaml b/internal/indexer/definitions/btn.yaml index 1b54648..6ca5fd0 100644 --- a/internal/indexer/definitions/btn.yaml +++ b/internal/indexer/definitions/btn.yaml @@ -72,34 +72,34 @@ irc: label: NickServ Password help: NickServ password -parse: - type: multi - lines: - - test: - - "NOW BROADCASTING! [ The Show S06E07 720p WEB-DL DD 5.1 H.264 - LP ]" - pattern: ^NOW BROADCASTING! \[ (.*) \] - vars: - - torrentName - - test: - - "[ Title: S06E07 ] [ Series: The Show ]" - pattern: '^\[ Title: .* \] \[ Series: (.*) \]' - vars: - - title - - test: - - "[ 2010 ] [ Episode ] [ MKV | x264 | WEB | P2P ] [ Uploader: Uploader1 ]" - pattern: '^(?:\[ (\d+) \] )?\[ (.*) \] \[ (.*) \] \[ Uploader: (.*?) \](?: \[ Pretime: (.*) \])?' - vars: - - year - - category - - releaseTags - - uploader - - preTime - - test: - - "[ https://XXXXXXXXX/torrents.php?id=7338 / https://XXXXXXXXX/torrents.php?action=download&id=9116 ]" - pattern: ^\[ .* \/ (https?:\/\/.*id=(\d+)) \] - vars: - - baseUrl - - torrentId + parse: + type: multi + lines: + - test: + - "NOW BROADCASTING! [ The Show S06E07 720p WEB-DL DD 5.1 H.264 - LP ]" + pattern: ^NOW BROADCASTING! \[ (.*) \] + vars: + - torrentName + - test: + - "[ Title: S06E07 ] [ Series: The Show ]" + pattern: '^\[ Title: .* \] \[ Series: (.*) \]' + vars: + - title + - test: + - "[ 2010 ] [ Episode ] [ MKV | x264 | WEB | P2P ] [ Uploader: Uploader1 ]" + pattern: '^(?:\[ (\d+) \] )?\[ (.*) \] \[ (.*) \] \[ Uploader: (.*?) \](?: \[ Pretime: (.*) \])?' + vars: + - year + - category + - releaseTags + - uploader + - preTime + - test: + - "[ https://XXXXXXXXX/torrents.php?id=7338 / https://XXXXXXXXX/torrents.php?action=download&id=9116 ]" + pattern: \[ .* \/ (https?:\/\/.*\/).+id=(\d+) \] + vars: + - baseUrl + - torrentId - match: - torrenturl: "{{ .baseUrl }}&authkey={{ .authkey }}&torrent_pass={{ .torrent_pass }}" + match: + torrenturl: "/torrents.php?action=download&id={{ .torrentId }}&authkey={{ .authkey }}&torrent_pass={{ .torrent_pass }}" diff --git a/internal/indexer/definitions/danishbytes.yaml b/internal/indexer/definitions/danishbytes.yaml index cf4462b..20eb9ab 100644 --- a/internal/indexer/definitions/danishbytes.yaml +++ b/internal/indexer/definitions/danishbytes.yaml @@ -54,22 +54,22 @@ irc: label: Invite command help: Invite auth with DBBot. Replace IRCKEY with your key. -parse: - type: single - lines: - - test: - - ":[N]-[Movies]-[Encode]-[720p]-[797 MiB]-[Some.Old.Movie.1972.720p.BluRay.x264.AAC-GROUP]-[Anonymous]-[https://danishbytes.club/torrents/0000]-[FL: 0]-[DU: 0];" - pattern: ':\[N\]-\[(.*)\]-\[(.*)\]-\[(.*)\]-\[(.*)\]-\[(.*)\]-\[(.*)\]-\[(.*\/)(?:.*\/)(.*)\]-\[FL: (.*)\]-\[DU: .*\];' - vars: - - category - - releaseTags - - resolution - - torrentSize - - torrentName - - uploader - - baseUrl - - torrentId - - freeleech + parse: + type: single + lines: + - test: + - ":[N]-[Movies]-[Encode]-[720p]-[797 MiB]-[Some.Old.Movie.1972.720p.BluRay.x264.AAC-GROUP]-[Anonymous]-[https://danishbytes.club/torrents/0000]-[FL: 0]-[DU: 0];" + pattern: ':\[N\]-\[(.*)\]-\[(.*)\]-\[(.*)\]-\[(.*)\]-\[(.*)\]-\[(.*)\]-\[(.*\/)(?:.*\/)(.*)\]-\[FL: (.*)\]-\[DU: .*\];' + vars: + - category + - releaseTags + - resolution + - torrentSize + - torrentName + - uploader + - baseUrl + - torrentId + - freeleech - match: - torrenturl: "{{ .baseUrl }}torrent/download/{{ .torrentId }}.{{ .passkey }}" + match: + torrenturl: "/torrent/download/{{ .torrentId }}.{{ .passkey }}" diff --git a/internal/indexer/definitions/digitalcore.yaml b/internal/indexer/definitions/digitalcore.yaml index 800ed50..ab93572 100644 --- a/internal/indexer/definitions/digitalcore.yaml +++ b/internal/indexer/definitions/digitalcore.yaml @@ -5,7 +5,7 @@ identifier: digitalcore description: DigitalCore (DC) is a private torrent tracker for General / 0 Day. language: en-us urls: - - https://digitalcore.club + - https://digitalcore.club/ privacy: private protocol: torrent supports: @@ -54,17 +54,17 @@ irc: label: Invite command help: Invite auth with Endor. Replace USERNAME and IRCKEY -parse: - type: single - lines: - - test: - - "NEW TORRENT in Movies/XviD :: This.is.my.Movie.2019.BRRip.XviD.AC3-iND :: https://digitalcore.club/api/v1/torrents/download/00000" - pattern: '^NEW.TORRENT.in.(.*?).::.(.*?).::.(.*)\/([0-9a-zA-Z]+)' - vars: - - category - - torrentName - - baseUrl - - torrentId + parse: + type: single + lines: + - test: + - "NEW TORRENT in Movies/XviD :: This.is.my.Movie.2019.BRRip.XviD.AC3-iND :: https://digitalcore.club/api/v1/torrents/download/00000" + pattern: 'NEW TORRENT in (.+) :: (.+) :: (https:\/\/.+\/).+\/([0-9a-zA-Z]+)' + vars: + - category + - torrentName + - baseUrl + - torrentId - match: - torrenturl: "{{ .baseUrl }}/{{ .torrentId }}/{{ .passkey }}" + match: + torrenturl: "/api/v1/torrents/download/{{ .torrentId }}/{{ .passkey }}" diff --git a/internal/indexer/definitions/emp.yaml b/internal/indexer/definitions/emp.yaml index 53c31c2..ad7826a 100644 --- a/internal/indexer/definitions/emp.yaml +++ b/internal/indexer/definitions/emp.yaml @@ -5,7 +5,8 @@ identifier: emp description: Empornium (EMP) is a private torrent tracker for XXX language: en-us urls: - - https://www.empornium.is + - https://www.empornium.is/ + - https://www.empornium.sx/ privacy: private protocol: torrent supports: @@ -53,19 +54,19 @@ irc: label: NickServ Password help: NickServ password -parse: - type: single - lines: - - test: - - "Some long funny title - Size: 2.54 GiB - Uploader: uploader1 - Tags: tag1,tag2 - https://www.empornium.is/torrents.php?torrentid=000000" - pattern: '(.*) - Size: (.*) - Uploader: (.*) - Tags: (.*) - (https:\/\/.*torrents\.php\?)torrentid=(.*)' - vars: - - torrentName - - torrentSize - - uploader - - tags - - baseUrl - - torrentId + parse: + type: single + lines: + - test: + - "Some long funny title - Size: 2.54 GiB - Uploader: uploader1 - Tags: tag1,tag2 - https://www.empornium.is/torrents.php?torrentid=000000" + pattern: '(.*) - Size: (.+) - Uploader: (.+) - Tags: (.*) - (https:\/\/.*\/)torrents\.php\?torrentid=(\d+)' + vars: + - torrentName + - torrentSize + - uploader + - tags + - baseUrl + - torrentId - match: - torrenturl: "{{ .baseUrl }}action=download&id={{ .torrentId }}&authkey={{ .authkey }}&torrent_pass={{ .torrent_pass }}" + match: + torrenturl: "/torrents.php?action=download&id={{ .torrentId }}&authkey={{ .authkey }}&torrent_pass={{ .torrent_pass }}" diff --git a/internal/indexer/definitions/enthralled.yaml b/internal/indexer/definitions/enthralled.yaml index 2d5081d..72733e5 100644 --- a/internal/indexer/definitions/enthralled.yaml +++ b/internal/indexer/definitions/enthralled.yaml @@ -5,7 +5,7 @@ identifier: enthralled description: Enthralled (ENT) is a private torrent tracker for XXX language: en-us urls: - - https://enthralled.me + - https://enthralled.me/ privacy: private protocol: torrent supports: @@ -53,19 +53,19 @@ irc: label: NickServ Password help: NickServ password -parse: - type: single - lines: - - test: - - "Some release - Size: 559.06 MiB - Uploader: anon - Tags: worship,other - https://www.enthralled.me/torrents.php?torrentid=0000" - pattern: '(.*) - Size: (.*) - Uploader: (.*) - Tags: (.*?) - (https://.*)/torrents.php\?torrentid=(.*)' - vars: - - torrentName - - torrentSize - - uploader - - tags - - baseUrl - - torrentId + parse: + type: single + lines: + - test: + - "Some release - Size: 559.06 MiB - Uploader: anon - Tags: worship,other - https://www.enthralled.me/torrents.php?torrentid=0000" + pattern: '(.*) - Size: (.+) - Uploader: (.+) - Tags: (.*?) - (https://.+\/)torrents.php\?torrentid=(\d+)' + vars: + - torrentName + - torrentSize + - uploader + - tags + - baseUrl + - torrentId - match: - torrenturl: "{{ .baseUrl }}/torrents.php?action=download&id={{ .torrentId }}&authkey={{ .authkey }}&torrent_pass={{ .torrent_pass }}" + match: + torrenturl: "/torrents.php?action=download&id={{ .torrentId }}&authkey={{ .authkey }}&torrent_pass={{ .torrent_pass }}" diff --git a/internal/indexer/definitions/filelist.yaml b/internal/indexer/definitions/filelist.yaml index 9efff55..5c61146 100644 --- a/internal/indexer/definitions/filelist.yaml +++ b/internal/indexer/definitions/filelist.yaml @@ -5,7 +5,7 @@ identifier: fl description: FileList (FL) is a ROMANIAN private torrent tracker for MOVIES / TV / GENERAL language: en-us urls: - - https://filelist.io + - https://filelist.io/ privacy: private protocol: torrent supports: @@ -47,25 +47,25 @@ irc: label: NickServ Password help: NickServ password -parse: - type: single - lines: - - test: - - 'New Torrent: This.Really.Old.Movie.1965.DVDRip.DD1.0.x264 -- [Filme SD] [1.91 GB] -- https://filelist.io/details.php?id=000000 -- by uploader1' - - 'New Torrent: This.New.Movie.2021.1080p.Blu-ray.AVC.DTS-HD.MA.5.1-BEATRIX -- [FreeLeech!] -- [Filme Blu-Ray] [26.78 GB] -- https://filelist.io/details.php?id=000000 -- by uploader1' - - 'New Torrent: This.New.Movie.2021.1080p.Remux.AVC.DTS-HD.MA.5.1-playBD -- [FreeLeech!] -- [Internal!] -- [Filme Blu-Ray] [17.69 GB] -- https://filelist.io/details.php?id=000000 -- by uploader1' - pattern: 'New Torrent: (.*?) (?:-- \[(FreeLeech)!] )?(?:-- \[(Internal)!] )?-- \[(.*)] \[(.*)] -- (https?:\/\/filelist.io\/).*id=(.*) -- by (.*)' - vars: - - torrentName - - freeleech - - origin - - category - - torrentSize - - baseUrl - - torrentId - - uploader + parse: + type: single + lines: + - test: + - 'New Torrent: This.Really.Old.Movie.1965.DVDRip.DD1.0.x264 -- [Filme SD] [1.91 GB] -- https://filelist.io/details.php?id=000000 -- by uploader1' + - 'New Torrent: This.New.Movie.2021.1080p.Blu-ray.AVC.DTS-HD.MA.5.1-BEATRIX -- [FreeLeech!] -- [Filme Blu-Ray] [26.78 GB] -- https://filelist.io/details.php?id=000000 -- by uploader1' + - 'New Torrent: This.New.Movie.2021.1080p.Remux.AVC.DTS-HD.MA.5.1-playBD -- [FreeLeech!] -- [Internal!] -- [Filme Blu-Ray] [17.69 GB] -- https://filelist.io/details.php?id=000000 -- by uploader1' + pattern: 'New Torrent: (.*?) (?:-- \[(FreeLeech)!] )?(?:-- \[(Internal)!] )?-- \[(.*)] \[(.*)] -- (https?:\/\/filelist.io\/).*id=(.*) -- by (.*)' + vars: + - torrentName + - freeleech + - origin + - category + - torrentSize + - baseUrl + - torrentId + - uploader - match: - torrenturl: "{{ .baseUrl }}download.php?id={{ .torrentId }}&file={{ .torrentName }}.torrent&passkey={{ .passkey }}" - encode: - - torrentName + match: + torrenturl: "/download.php?id={{ .torrentId }}&file={{ .torrentName }}.torrent&passkey={{ .passkey }}" + encode: + - torrentName diff --git a/internal/indexer/definitions/fuzer.yaml b/internal/indexer/definitions/fuzer.yaml index beb9b73..d66db2d 100644 --- a/internal/indexer/definitions/fuzer.yaml +++ b/internal/indexer/definitions/fuzer.yaml @@ -50,24 +50,24 @@ irc: label: NickServ Password help: NickServ password -parse: - type: single - lines: - - test: - - "New Torrent: סדרה - עונה 4 פרק 5 | Show S04E05 2160p UHDTV x265-Release-Group Category: סדרות ישראליות HD By: Uploader1 Size: 2.88GB Link: http://fuzer.me/attachment.php?attachmentid=101010 [Show.S04E05.2160p.UHDTV.x265-Release-Group]" - - "New Torrent: סדרה אפילו יותר טובה - עונה 1 פרק 7 - תרגום בצד | Even Better Show S01E07 1080p AMZN WEB-DL DDP5.1 H.264 Category: סדרות HD By: EvenBett3rUploader Size: 2.27GB Link: http://fuzer.me/attachment.php?attachmentid=222222 [Even.Better.Show.S01E07.14.45.1080p.AMZN.WEB-DL.DDP5.1.H.264]" - - "New Torrent: הכי טובה - עונה 1 פרק 5 - תרגום בצד | The Best S01E05 1080p WEB H264-TEST Category: סדרות HD By: Uploader5 Size: 3.25GB Link: http://fuzer.me/attachment.php?attachmentid=616161 [The.Best.S01E05.1080p.WEB.H264-TEST]" - pattern: 'New Torrent: (.*) Category: (.*) By: (.*) Size: (.*) Link: https?\:\/\/([^\/]+)\/.*[&\?]attachmentid=(\d+) \[(.*)\]' - vars: - - name1 - - category - - uploader - - torrentSize - - baseUrl - - torrentId - - torrentName + parse: + type: single + lines: + - test: + - "New Torrent: סדרה - עונה 4 פרק 5 | Show S04E05 2160p UHDTV x265-Release-Group Category: סדרות ישראליות HD By: Uploader1 Size: 2.88GB Link: http://fuzer.me/attachment.php?attachmentid=101010 [Show.S04E05.2160p.UHDTV.x265-Release-Group]" + - "New Torrent: סדרה אפילו יותר טובה - עונה 1 פרק 7 - תרגום בצד | Even Better Show S01E07 1080p AMZN WEB-DL DDP5.1 H.264 Category: סדרות HD By: EvenBett3rUploader Size: 2.27GB Link: http://fuzer.me/attachment.php?attachmentid=222222 [Even.Better.Show.S01E07.14.45.1080p.AMZN.WEB-DL.DDP5.1.H.264]" + - "New Torrent: הכי טובה - עונה 1 פרק 5 - תרגום בצד | The Best S01E05 1080p WEB H264-TEST Category: סדרות HD By: Uploader5 Size: 3.25GB Link: http://fuzer.me/attachment.php?attachmentid=616161 [The.Best.S01E05.1080p.WEB.H264-TEST]" + pattern: 'New Torrent: (.*) Category: (.*) By: (.*) Size: (.*) Link: https?\:\/\/([^\/]+)\/.*[&\?]attachmentid=(\d+) \[(.*)\]' + vars: + - name1 + - category + - uploader + - torrentSize + - baseUrl + - torrentId + - torrentName - match: - torrenturl: "https://www.{{ .baseUrl }}/rss/torrent.php/{{ .torrentId }}/{{ .uid }}/{{ .passkey }}/{{ .torrentName }}.torrent" - encode: - - torrentName + match: + torrenturl: "/rss/torrent.php/{{ .torrentId }}/{{ .uid }}/{{ .passkey }}/{{ .torrentName }}.torrent" + encode: + - torrentName diff --git a/internal/indexer/definitions/gazellegames.yaml b/internal/indexer/definitions/gazellegames.yaml index 8808446..32bd0b1 100644 --- a/internal/indexer/definitions/gazellegames.yaml +++ b/internal/indexer/definitions/gazellegames.yaml @@ -79,23 +79,23 @@ irc: label: Invite command help: Invite auth with Vertigo. Replace USERNAME and IRCKEY. -parse: - type: single - lines: - - test: - - "Uploader :-: Nintendo 3DS :-: Cool.Game.KOR.3DS-BigBlueBox in Cool Game [2013] ::Korean, Multi-Region, Scene:: https://gazellegames.net/torrents.php?torrentid=00000 - adventure, role_playing_game, nintendo;" - - "Uploader :-: Windows :-: Other.Game-HI2U in Other Game [2016] ::English, Scene:: FREELEECH! :: https://gazellegames.net/torrents.php?torrentid=00000 - action, adventure, casual, indie, role.playing.game;" - pattern: '^(.+) :-: (.+) :-: (.+) \[(\d+)?\] ::(.+?)?:: ?(.+?)?(?:! ::)? (https?:\/\/[^\/]+\/)torrents.php\?torrentid=(\d+)(?: - )?([a-zA-Z0-9, _\.]+)?;?(?:[ :]*(?:[NSFW]*)?[! :]*)?$' - vars: - - uploader - - category - - torrentName - - year - - releaseTags - - freeleech - - baseUrl - - torrentId - - tags + parse: + type: single + lines: + - test: + - "Uploader :-: Nintendo 3DS :-: Cool.Game.KOR.3DS-BigBlueBox in Cool Game [2013] ::Korean, Multi-Region, Scene:: https://gazellegames.net/torrents.php?torrentid=00000 - adventure, role_playing_game, nintendo;" + - "Uploader :-: Windows :-: Other.Game-HI2U in Other Game [2016] ::English, Scene:: FREELEECH! :: https://gazellegames.net/torrents.php?torrentid=00000 - action, adventure, casual, indie, role.playing.game;" + pattern: '^(.+) :-: (.+) :-: (.+) \[(\d+)?\] ::(.+?)?:: ?(.+?)?(?:! ::)? (https?:\/\/[^\/]+\/)torrents.php\?torrentid=(\d+)(?: - )?([a-zA-Z0-9, _\.]+)?;?(?:[ :]*(?:[NSFW]*)?[! :]*)?$' + vars: + - uploader + - category + - torrentName + - year + - releaseTags + - freeleech + - baseUrl + - torrentId + - tags - match: - torrenturl: "{{ .baseUrl }}torrents.php?action=download&id={{ .torrentId }}&authkey={{ .authkey }}&torrent_pass={{ .torrent_pass }}" + match: + torrenturl: "/torrents.php?action=download&id={{ .torrentId }}&authkey={{ .authkey }}&torrent_pass={{ .torrent_pass }}" diff --git a/internal/indexer/definitions/hd-space.yaml b/internal/indexer/definitions/hd-space.yaml index 8cfdc39..6e24c20 100644 --- a/internal/indexer/definitions/hd-space.yaml +++ b/internal/indexer/definitions/hd-space.yaml @@ -5,7 +5,7 @@ identifier: hd-space description: HD-Space (HDS) is a Private Torrent Tracker for HD MOVIES / TV language: en-us urls: - - https://hd-space.org + - https://hd-space.org/ privacy: private protocol: torrent supports: @@ -47,22 +47,22 @@ irc: label: NickServ Password help: NickServ password -parse: - type: single - lines: - - test: - - "New Torrent in category [HDTV 1080] Show S03E06 2160p PMTP WEB-DL DDP5 1 DV HEVC-GROUP1 (4.52 GB) uploaded! Download: https://hd-space.org/download.php?id=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" - - "New Torrent in category [Blu-Ray] The Movie 2022 1080p Blu-ray AVC DTS-HD MA 5.1-GROUP2 (23.21 GB) uploaded! Download: https://hd-space.org/download.php?id=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" - - "New Torrent in category [Blu-Ray] Other movie with long tittle 2013 2160 UHD EXTENDED Blu-ray HEVC TrueHD 7.1-GROUP3@HDSpace (88.20 GB) uploaded! Download: https://hd-space.org/download.php?id=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" - pattern: 'New Torrent in category \[([^\]]*)\] (.*) \(([^\)]*)\) uploaded! Download\: (https?\:\/\/[^\/]+\/).*[&\?]id=([a-f0-9]+)' - vars: - - category - - torrentName - - torrentSize - - baseUrl - - torrentId + parse: + type: single + lines: + - test: + - "New Torrent in category [HDTV 1080] Show S03E06 2160p PMTP WEB-DL DDP5 1 DV HEVC-GROUP1 (4.52 GB) uploaded! Download: https://hd-space.org/download.php?id=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + - "New Torrent in category [Blu-Ray] The Movie 2022 1080p Blu-ray AVC DTS-HD MA 5.1-GROUP2 (23.21 GB) uploaded! Download: https://hd-space.org/download.php?id=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + - "New Torrent in category [Blu-Ray] Other movie with long tittle 2013 2160 UHD EXTENDED Blu-ray HEVC TrueHD 7.1-GROUP3@HDSpace (88.20 GB) uploaded! Download: https://hd-space.org/download.php?id=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + pattern: 'New Torrent in category \[([^\]]*)\] (.*) \(([^\)]*)\) uploaded! Download\: (https?\:\/\/[^\/]+\/).*[&\?]id=([a-f0-9]+)' + vars: + - category + - torrentName + - torrentSize + - baseUrl + - torrentId - match: - torrenturl: "{{ .baseUrl }}download.php?id={{ .torrentId }}&f={{ .torrentName }}.torrent&rsspid={{ .rsskey }}" - encode: - - torrentName + match: + torrenturl: "/download.php?id={{ .torrentId }}&f={{ .torrentName }}.torrent&rsspid={{ .rsskey }}" + encode: + - torrentName diff --git a/internal/indexer/definitions/hd-torrents.yaml b/internal/indexer/definitions/hd-torrents.yaml index 2e74df4..3c104a5 100644 --- a/internal/indexer/definitions/hd-torrents.yaml +++ b/internal/indexer/definitions/hd-torrents.yaml @@ -6,7 +6,7 @@ description: HD-Torrents (HD-T) is a private torrent tracker for HD MOVIES / TV language: en-us urls: - https://hd-torrents.org/ - - https://hdts.ru + - https://hdts.ru/ privacy: private protocol: torrent supports: @@ -53,20 +53,20 @@ irc: label: NickServ Password help: NickServ password -parse: - type: single - lines: - - test: - - "New Torrent in category [Movies/Remux] That Movie (2008) Blu-ray 1080p REMUX AVC DTS-HD MA 7 1 (14.60 GB) uploaded! Download: https://hd-torrents.org/download.php?id=AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - pattern: 'New Torrent in category \[([^\]]*)\] (.*) \(([^\)]*)\) uploaded! Download\: (https?\:\/\/[^\/]+\/).+id=(.+)' - vars: - - category - - torrentName - - torrentSize - - baseUrl - - torrentId + parse: + type: single + lines: + - test: + - "New Torrent in category [Movies/Remux] That Movie (2008) Blu-ray 1080p REMUX AVC DTS-HD MA 7 1 (14.60 GB) uploaded! Download: https://hd-torrents.org/download.php?id=AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + pattern: 'New Torrent in category \[([^\]]*)\] (.*) \(([^\)]*)\) uploaded! Download\: (https?\:\/\/[^\/]+\/).+id=(.+)' + vars: + - category + - torrentName + - torrentSize + - baseUrl + - torrentId - match: - torrenturl: "{{ .baseUrl }}rss/?action=download&key={{ .key }}&token={{ .token }}&hash={{ .torrentId }}&title={{ .torrentName }}" - encode: - - torrentName + match: + torrenturl: "/rss/?action=download&key={{ .key }}&token={{ .token }}&hash={{ .torrentId }}&title={{ .torrentName }}" + encode: + - torrentName diff --git a/internal/indexer/definitions/hdb.yaml b/internal/indexer/definitions/hdb.yaml index da339ed..84ddc25 100644 --- a/internal/indexer/definitions/hdb.yaml +++ b/internal/indexer/definitions/hdb.yaml @@ -54,24 +54,24 @@ irc: label: Invite command help: Invite auth with the key from https://hdbits.org/bot_invite.php. Replace IRCKEY. -parse: - type: single - lines: - - test: - - "New Torrent: Clockers 1995 1080p Blu-ray AVC DTS-HD MA 5.1-Anonymous - Type: Movie (H.264, Blu-ray/HD DVD) - Uploaded by: Anonymous - Size: 37.61 GiB - https://hdbits.org/details.php?id=12345&hit=1" - - "New Torrent: PilotsEYE tv: QUITO 2014 1080p Blu-ray AVC DD 2.0 - Type: Documentary (H.264, Blu-ray/HD DVD) - Uploaded by: Anonymous - Size: 23.14 GiB - https://hdbits.org/details.php?id=12345&hit=1" - - "New Torrent: Xiao Q 2019 720p BluRay DD-EX 5.1 x264-Anonymous - Type: Movie (H.264, Encode) Internal! - Uploaded by: Anonymous - Size: 4.54 GiB - https://hdbits.org/details.php?id=12345&hit=1" - - "New Torrent: The Gentlemen 2019 UHD Blu-ray English TrueHD 7.1 - Type: Audio Track - Uploaded by: Anonymous - Size: 3.19 GiB - https://hdbits.org/details.php?id=519896&hit=1" - pattern: '^New Torrent: (.+) - Type: (.+?) (?:\((.+)\))?\s?(?:(Internal)!?)?\s?- Uploaded by: (.+) - Size: (.+) - (https://.+?/).+id=(\d+)' - vars: - - torrentName - - category - - releaseTags - - origin - - uploader - - torrentSize - - baseUrl - - torrentId + parse: + type: single + lines: + - test: + - "New Torrent: Clockers 1995 1080p Blu-ray AVC DTS-HD MA 5.1-Anonymous - Type: Movie (H.264, Blu-ray/HD DVD) - Uploaded by: Anonymous - Size: 37.61 GiB - https://hdbits.org/details.php?id=12345&hit=1" + - "New Torrent: PilotsEYE tv: QUITO 2014 1080p Blu-ray AVC DD 2.0 - Type: Documentary (H.264, Blu-ray/HD DVD) - Uploaded by: Anonymous - Size: 23.14 GiB - https://hdbits.org/details.php?id=12345&hit=1" + - "New Torrent: Xiao Q 2019 720p BluRay DD-EX 5.1 x264-Anonymous - Type: Movie (H.264, Encode) Internal! - Uploaded by: Anonymous - Size: 4.54 GiB - https://hdbits.org/details.php?id=12345&hit=1" + - "New Torrent: The Gentlemen 2019 UHD Blu-ray English TrueHD 7.1 - Type: Audio Track - Uploaded by: Anonymous - Size: 3.19 GiB - https://hdbits.org/details.php?id=519896&hit=1" + pattern: '^New Torrent: (.+) - Type: (.+?) (?:\((.+)\))?\s?(?:(Internal)!?)?\s?- Uploaded by: (.+) - Size: (.+) - (https://.+?/).+id=(\d+)' + vars: + - torrentName + - category + - releaseTags + - origin + - uploader + - torrentSize + - baseUrl + - torrentId - match: - torrenturl: "{{ .baseUrl }}download.php?id={{ .torrentId }}&passkey={{ .passkey }}" + match: + torrenturl: "/download.php?id={{ .torrentId }}&passkey={{ .passkey }}" diff --git a/internal/indexer/definitions/hebits.yaml b/internal/indexer/definitions/hebits.yaml index 11f9ea0..e3666a6 100644 --- a/internal/indexer/definitions/hebits.yaml +++ b/internal/indexer/definitions/hebits.yaml @@ -58,31 +58,31 @@ irc: label: Invite command help: "Replace IRCKEY with: Edit Profile -> Access Settings -> IRC Key" -parse: - type: multi - lines: - - test: - - "New: (מה שקורה בצללים - עונה 4, פרק 3 / What We Do in the Shadows - S04E03 *היידפנישן*) Category: סדרות - HD Size: 825.43 MiB Seeders: 0 Leechers: 0" - - "New: (לגו מלחמת הכוכבים: חופשת קיץ / LEGO Star Wars Summer Vacation *היידפנישן*) Category: סרטים - HD Size: 1.02 GiB Seeders: 0 Leechers: 0" - - "New: (תמונות מחיי נישואין - עונה 1 / Scenes from a Marriage (US) - S01 *היידפנישן מלא*) Category: סדרות - HD מלא Size: 18.61 GiB Seeders: 0 Leechers: 0" - pattern: '^New: \((.*)\) Category: (.*) Size: ([\d\.,]+ \w+) Seeders: .+ Leechers: .+' - vars: - - name1 - - category - - torrentSize - - test: - - "Link: https://hebits.net/torrents.php?torrentid=80081" - pattern: '^Link: https?\:\/\/?[w{3}.]*([^\/]+).*(?:&|\?)torrentid=(\d+)' - vars: - - baseUrl - - torrentId - - test: - - "Release: What.We.Do.in.the.Shadows.S04E03.The.Grand.Opening.720p.AMZN.WEB.DL.DDP5.1.H.264-FLUX" - - "Release: LEGO.Star.Wars.Summer.Vacation.2022.720p.WEB-DL.H.264.HebDub-iSrael" - - "Release: Scenes.From.a.Marriage.US.S01.1080p.AMZN.WEB-DL.DDP5.1.H.264-FLUX" - pattern: "^Release: (.*)" - vars: - - torrentName + parse: + type: multi + lines: + - test: + - "New: (מה שקורה בצללים - עונה 4, פרק 3 / What We Do in the Shadows - S04E03 *היידפנישן*) Category: סדרות - HD Size: 825.43 MiB Seeders: 0 Leechers: 0" + - "New: (לגו מלחמת הכוכבים: חופשת קיץ / LEGO Star Wars Summer Vacation *היידפנישן*) Category: סרטים - HD Size: 1.02 GiB Seeders: 0 Leechers: 0" + - "New: (תמונות מחיי נישואין - עונה 1 / Scenes from a Marriage (US) - S01 *היידפנישן מלא*) Category: סדרות - HD מלא Size: 18.61 GiB Seeders: 0 Leechers: 0" + pattern: '^New: \((.*)\) Category: (.*) Size: ([\d\.,]+ \w+) Seeders: .+ Leechers: .+' + vars: + - name1 + - category + - torrentSize + - test: + - "Link: https://hebits.net/torrents.php?torrentid=80081" + pattern: '^Link: (https?\:\/\/?[w{3}.]*[^\/]+\/).+torrentid=(\d+)' + vars: + - baseUrl + - torrentId + - test: + - "Release: What.We.Do.in.the.Shadows.S04E03.The.Grand.Opening.720p.AMZN.WEB.DL.DDP5.1.H.264-FLUX" + - "Release: LEGO.Star.Wars.Summer.Vacation.2022.720p.WEB-DL.H.264.HebDub-iSrael" + - "Release: Scenes.From.a.Marriage.US.S01.1080p.AMZN.WEB-DL.DDP5.1.H.264-FLUX" + pattern: "^Release: (.*)" + vars: + - torrentName - match: - torrenturl: "https://{{ .baseUrl }}/torrents.php?action=download&id={{ .torrentId }}&authkey={{ .authkey }}&torrent_pass={{ .passkey }}" + match: + torrenturl: "/torrents.php?action=download&id={{ .torrentId }}&authkey={{ .authkey }}&torrent_pass={{ .passkey }}" diff --git a/internal/indexer/definitions/huno.yaml b/internal/indexer/definitions/huno.yaml index 8b59cff..8eb911e 100644 --- a/internal/indexer/definitions/huno.yaml +++ b/internal/indexer/definitions/huno.yaml @@ -5,7 +5,7 @@ identifier: huno description: Hawke-UNO (HUNO) is a private torrent tracker for MOVIES / TV. language: en-us urls: - - https://hawke.uno + - https://hawke.uno/ privacy: private protocol: torrent supports: @@ -47,22 +47,22 @@ irc: label: NickServ Password help: NickServ password -parse: - type: single - lines: - - test: - - "New in [Movie]: Old Movie (1981) (1080p BluRay x265 SDR DD 2.0 English - group1) [4.5 GiB] [FL: No] [INTERNAL: Yes] [https://hawke.uno/torrents/0000] by: [anon]" - - "New in [TV]: Popular show (2022) S01E09 (1080p DSNP WEB-DL x265 SDR DDP Atmos 5.1 English - GROUP)[REPACK] [955.97 MiB] [FL: Yes] [INTERNAL: Yes] [https://hawke.uno/torrents/0000] by: [uploader]" - pattern: 'New in \[(.+)\]: (.+)(?:\[(?:REPACK\d?|PROPER)\])? \[(.+)\] \[FL: (Yes|No)\] \[INTERNAL: (Yes|No)\] \[(https:\/\/.+)\/torrents\/(\d+)\] by: \[(.+)\]' - vars: - - category - - torrentName - - torrentSize - - freeleech - - internal - - baseUrl - - torrentId - - uploader + parse: + type: single + lines: + - test: + - "New in [Movie]: Old Movie (1981) (1080p BluRay x265 SDR DD 2.0 English - group1) [4.5 GiB] [FL: No] [INTERNAL: Yes] [https://hawke.uno/torrents/0000] by: [anon]" + - "New in [TV]: Popular show (2022) S01E09 (1080p DSNP WEB-DL x265 SDR DDP Atmos 5.1 English - GROUP)[REPACK] [955.97 MiB] [FL: Yes] [INTERNAL: Yes] [https://hawke.uno/torrents/0000] by: [uploader]" + pattern: 'New in \[(.+)\]: (.+)(?:\[(?:REPACK\d?|PROPER)\])? \[(.+)\] \[FL: (Yes|No)\] \[INTERNAL: (Yes|No)\] \[(https:\/\/.+\/)torrents\/(\d+)\] by: \[(.+)\]' + vars: + - category + - torrentName + - torrentSize + - freeleech + - internal + - baseUrl + - torrentId + - uploader - match: - torrenturl: "{{ .baseUrl }}/torrent/download/{{ .torrentId }}.{{ .rsskey }}" + match: + torrenturl: "/torrent/download/{{ .torrentId }}.{{ .rsskey }}" diff --git a/internal/indexer/definitions/immortalseed.yaml b/internal/indexer/definitions/immortalseed.yaml index 91dcd52..c1efd63 100644 --- a/internal/indexer/definitions/immortalseed.yaml +++ b/internal/indexer/definitions/immortalseed.yaml @@ -5,7 +5,7 @@ identifier: immortalseed description: ImmortalSeed (iS) is a Private Torrent Tracker for MOVIES / TV / GENERAL language: en-us urls: - - https://immortalseed.me + - https://immortalseed.me/ privacy: private protocol: torrent supports: @@ -55,20 +55,20 @@ irc: label: Invite command help: Invite auth with immortal. Replace USERNAME and PASSKEY. -parse: - type: single - lines: - - test: - - "ImmortalSeed - Category: ( TV - High Definition ) Torrent: ( The.Show.S07E02.Lunch.At.Sea.720p.WEBRip.X264-GROUP1 ) Size: ( 457.07 MB ) Link: ( https://immortalseed.me/details.php?id=0000000 )" - - "ImmortalSeed - Category: ( TV - High Definition ) Torrent: ( Other.Show.S01E02.1080p.WEB.H264-GROUP2 ) Size: ( 3.66 GB ) Link: ( https://immortalseed.me/details.php?id=0000000 )" - - "ImmortalSeed - Category: ( Anime ) Torrent: ( Some.Anime.Show.S01E04.1080p.WEB.H264-GROUP3 ) Size: ( 1.34 GB ) Link: ( https://immortalseed.me/details.php?id=0000000 )" - pattern: '\s*ImmortalSeed - Category: \( (.*) \) Torrent: \( (.*) \) Size: \( (.*) \)\s+Link: \( (https?:\/\/.*\/).*id=(\d+) \)' - vars: - - category - - torrentName - - torrentSize - - baseUrl - - torrentId + parse: + type: single + lines: + - test: + - "ImmortalSeed - Category: ( TV - High Definition ) Torrent: ( The.Show.S07E02.Lunch.At.Sea.720p.WEBRip.X264-GROUP1 ) Size: ( 457.07 MB ) Link: ( https://immortalseed.me/details.php?id=0000000 )" + - "ImmortalSeed - Category: ( TV - High Definition ) Torrent: ( Other.Show.S01E02.1080p.WEB.H264-GROUP2 ) Size: ( 3.66 GB ) Link: ( https://immortalseed.me/details.php?id=0000000 )" + - "ImmortalSeed - Category: ( Anime ) Torrent: ( Some.Anime.Show.S01E04.1080p.WEB.H264-GROUP3 ) Size: ( 1.34 GB ) Link: ( https://immortalseed.me/details.php?id=0000000 )" + pattern: '\s*ImmortalSeed - Category: \( (.*) \) Torrent: \( (.*) \) Size: \( (.*) \)\s+Link: \( (https?:\/\/.*\/).*id=(\d+) \)' + vars: + - category + - torrentName + - torrentSize + - baseUrl + - torrentId - match: - torrenturl: "{{ .baseUrl }}download.php?type=rss&secret_key={{ .passkey }}&id={{ .torrentId }}" + match: + torrenturl: "/download.php?type=rss&secret_key={{ .passkey }}&id={{ .torrentId }}" diff --git a/internal/indexer/definitions/iplay.yaml b/internal/indexer/definitions/iplay.yaml index 89525c4..c138a19 100644 --- a/internal/indexer/definitions/iplay.yaml +++ b/internal/indexer/definitions/iplay.yaml @@ -5,7 +5,7 @@ identifier: romanianmetaltorrents description: Romanian Metal Torrents (RMT) is a private torrent tracker for METAL MUSIC. language: en-us urls: - - https://metal.iplay.ro + - https://metal.iplay.ro/ privacy: private protocol: torrent supports: @@ -47,20 +47,20 @@ irc: label: NickServ Password help: NickServ password -parse: - type: single - lines: - - test: - - "New torrent: Artist-Album-2022-GROUP -- [Black Metal] -- https://metal.iplay.ro/details.php?id=000000 -- by Anonymous" - - "New torrent: Artist-Album -[WEB | FLAC]- RMT -- [FreeLeech!] -- [-Discography/Album Pack] -- https://metal.iplay.ro/details.php?id=000000 -- by Anonymous" - pattern: 'New Torrent: (.*?) (?:-- \[(.*)!\] )?-- \[(.*)] -- (https?://.+/).*id=(.*) -- by (.*)' - vars: - - torrentName - - freeleech - - category - - baseUrl - - torrentId - - uploader + parse: + type: single + lines: + - test: + - "New torrent: Artist-Album-2022-GROUP -- [Black Metal] -- https://metal.iplay.ro/details.php?id=000000 -- by Anonymous" + - "New torrent: Artist-Album -[WEB | FLAC]- RMT -- [FreeLeech!] -- [-Discography/Album Pack] -- https://metal.iplay.ro/details.php?id=000000 -- by Anonymous" + pattern: 'New Torrent: (.*?) (?:-- \[(.*)!\] )?-- \[(.*)] -- (https?://.+/).*id=(.*) -- by (.*)' + vars: + - torrentName + - freeleech + - category + - baseUrl + - torrentId + - uploader - match: - torrenturl: "{{ .baseUrl }}/download2.php?id={{ .torrentId }}&passkey={{ .passkey }}" + match: + torrenturl: "/download2.php?id={{ .torrentId }}&passkey={{ .passkey }}" diff --git a/internal/indexer/definitions/iptorrents.yaml b/internal/indexer/definitions/iptorrents.yaml index a9ea70d..0a8373e 100644 --- a/internal/indexer/definitions/iptorrents.yaml +++ b/internal/indexer/definitions/iptorrents.yaml @@ -7,6 +7,15 @@ language: en-us urls: - https://iptorrents.com/ - https://iptorrents.me/ + - https://nemo.iptorrents.com/ + - https://ipt.getcrazy.me/ + - https://ipt.findnemo.net/ + - https://ipt.beelyrics.net/ + - https://ipt.venom.global/ + - https://ipt.workisboring.net/ + - https://ipt.lol/ + - https://ipt.cool/ + - https://ipt.world/ privacy: private protocol: torrent supports: @@ -49,22 +58,22 @@ irc: label: NickServ Password help: NickServ password -parse: - type: single - lines: - - test: - - "[Movies/XviD] The Movie 2010 DVDRip XviD-GROUP FREELEECH - http://www.iptorrents.com/details.php?id=000000 - 716.219 MB" - - "[Movies/XviD] The Movie 2010 DVDRip XviD-GROUP - http://www.iptorrents.com/details.php?id=000000 - 716.219 MB" - pattern: '^\[([^\]]*)] (.*?)\s*(FREELEECH)*\s*-\s+(https?\:\/\/[^\/]+).*[&\?]id=(\d+)\s*- (.*)' - vars: - - category - - torrentName - - freeleech - - baseUrl - - torrentId - - torrentSize + parse: + type: single + lines: + - test: + - "[Movies/XviD] The Movie 2010 DVDRip XviD-GROUP FREELEECH - http://www.iptorrents.com/details.php?id=000000 - 716.219 MB" + - "[Movies/XviD] The Movie 2010 DVDRip XviD-GROUP - http://www.iptorrents.com/details.php?id=000000 - 716.219 MB" + pattern: '\[(.+)] (.*?)\s*(FREELEECH)* - (https?\:\/\/.+\/).+id=(\d+) - (.*)' + vars: + - category + - torrentName + - freeleech + - baseUrl + - torrentId + - torrentSize - match: - torrenturl: "{{ .baseUrl }}/download.php/{{ .torrentId }}/{{ .torrentName }}.torrent?torrent_pass={{ .passkey }}" - encode: - - torrentName + match: + torrenturl: "/download.php/{{ .torrentId }}/{{ .torrentName }}.torrent?torrent_pass={{ .passkey }}" + encode: + - torrentName diff --git a/internal/indexer/definitions/milkie.yaml b/internal/indexer/definitions/milkie.yaml index e372644..15ba42e 100644 --- a/internal/indexer/definitions/milkie.yaml +++ b/internal/indexer/definitions/milkie.yaml @@ -5,7 +5,7 @@ identifier: milkie description: Milkie is a private torrent tracker for GENERAL. language: en-us urls: - - https://www.milkie.cc + - https://www.milkie.cc/ privacy: private protocol: torrent supports: @@ -50,20 +50,20 @@ irc: label: NickServ Password help: NickServ password -parse: - type: single - lines: - - test: - - "{tv} :: The.Great.Xmas.Show.S00E00.1080p.WEB.H264-TEST :: [1080p, web] :: https://milkie.cc/browse/xxxxxxxxxxxx" - pattern: '{(.*)}\s::\s(.*)\s::\s\[(.*)\]\s::\s(https?\:\/\/[^\/]+\/)browse\/(.*)' - vars: - - category - - torrentName - - releaseTags - - baseUrl - - torrentId + parse: + type: single + lines: + - test: + - "{tv} :: The.Great.Xmas.Show.S00E00.1080p.WEB.H264-TEST :: [1080p, web] :: https://milkie.cc/browse/xxxxxxxxxxxx" + pattern: '{(.*)}\s::\s(.*)\s::\s\[(.*)\]\s::\s(https?\:\/\/[^\/]+\/)browse\/(.*)' + vars: + - category + - torrentName + - releaseTags + - baseUrl + - torrentId - match: - torrenturl: "{{ .baseUrl }}api/v1/torrents/{{ .torrentId }}/torrent?key={{ .apikey }}" - encode: - - apikey + match: + torrenturl: "/api/v1/torrents/{{ .torrentId }}/torrent?key={{ .apikey }}" + encode: + - apikey diff --git a/internal/indexer/definitions/morethantv.yaml b/internal/indexer/definitions/morethantv.yaml index 85d69ac..3fdc965 100644 --- a/internal/indexer/definitions/morethantv.yaml +++ b/internal/indexer/definitions/morethantv.yaml @@ -5,7 +5,7 @@ identifier: morethantv description: MoreThanTv (MTV) is a torrent tracker for Series and Movies. language: en-us urls: - - https://www.morethantv.me + - https://www.morethantv.me/ privacy: private protocol: torrent supports: @@ -53,20 +53,20 @@ irc: label: NickServ Password help: NickServ password -parse: - type: single - lines: - - test: - - "TV.Show.2008.720p.BluRay.DTS.x264-TEST - Size: 6.56 GiB - Uploader: Test - Tags: autoup,h264,hd,dts.audio,bluray,720p,p2p.group.release,Test.release,hd.movie - https://www.morethantv.me/torrents.php?torrentid=000000" - pattern: '^(.*?) - Size: ([0-9]+?.*?) - Uploader: (.*?) - Tags: (.*(hd.episode|hd.season|sd.episode|sd.season|sd.movie|hd.movie)) - (https?:\/\/.*torrents.php\?)torrentid=(.*)$' - vars: - - torrentName - - torrentSize - - uploader - - tags - - category - - baseUrl - - torrentId + parse: + type: single + lines: + - test: + - "TV.Show.2008.720p.BluRay.DTS.x264-TEST - Size: 6.56 GiB - Uploader: Test - Tags: autoup,h264,hd,dts.audio,bluray,720p,p2p.group.release,Test.release,hd.movie - https://www.morethantv.me/torrents.php?torrentid=000000" + pattern: '(.+) - Size: (.+) - Uploader: (.+) - Tags: (.+(hd.episode|hd.season|sd.episode|sd.season|sd.movie|hd.movie)) - (https?:\/\/.+\/)torrents.php\?torrentid=(\d+)' + vars: + - torrentName + - torrentSize + - uploader + - tags + - category + - baseUrl + - torrentId - match: - torrenturl: "{{ .baseUrl }}action=download&id={{ .torrentId }}&authkey={{ .authkey }}&torrent_pass={{ .torrent_pass }}" + match: + torrenturl: "/torrents.php?action=download&id={{ .torrentId }}&authkey={{ .authkey }}&torrent_pass={{ .torrent_pass }}" diff --git a/internal/indexer/definitions/myanonamouse.yaml b/internal/indexer/definitions/myanonamouse.yaml index 39d58bf..6cb92e5 100644 --- a/internal/indexer/definitions/myanonamouse.yaml +++ b/internal/indexer/definitions/myanonamouse.yaml @@ -5,7 +5,7 @@ identifier: myanonamouse description: MyAnonaMouse (MAM) is a large ebook and audiobook tracker. language: en-us urls: - - https://www.myanonamouse.net + - https://www.myanonamouse.net/ privacy: private protocol: torrent supports: @@ -47,24 +47,24 @@ irc: label: NickServ Password help: NickServ password -parse: - type: single - lines: - - test: - - "New Torrent: Some famous book By: Author name Category: ( Ebooks - Science Fiction ) Size: ( 1.00 MiB ) Filetype: ( epub, mobi ) Language: ( English ) Link: ( https://www.myanonamouse.net/t/000000 )" - - "New Torrent: Some famous book By: Author name Category: ( Ebooks - Science Fiction ) Size: ( 2.11 MiB ) Filetype: ( epub, mobi ) Language: ( English ) Link: ( https://www.myanonamouse.net/t/000000 ) VIP" - pattern: 'New Torrent: (.*) By: (.*) Category: \( (.*) \) Size: \( (.*) \) Filetype: \( (.*) \) Language: \( (.*) \) Link: \( (https?\:\/\/[^\/]+\/).*?(\d+)\s*\)\s*(VIP)?' - vars: - - torrentName - - author - - category - - torrentSize - - tags - - language - - baseUrl - - torrentId - - freeleech + parse: + type: single + lines: + - test: + - "New Torrent: Some famous book By: Author name Category: ( Ebooks - Science Fiction ) Size: ( 1.00 MiB ) Filetype: ( epub, mobi ) Language: ( English ) Link: ( https://www.myanonamouse.net/t/000000 )" + - "New Torrent: Some famous book By: Author name Category: ( Ebooks - Science Fiction ) Size: ( 2.11 MiB ) Filetype: ( epub, mobi ) Language: ( English ) Link: ( https://www.myanonamouse.net/t/000000 ) VIP" + pattern: 'New Torrent: (.*) By: (.*) Category: \( (.*) \) Size: \( (.*) \) Filetype: \( (.*) \) Language: \( (.*) \) Link: \( (https?\:\/\/[^\/]+\/).*?(\d+)\s*\)\s*(VIP)?' + vars: + - torrentName + - author + - category + - torrentSize + - tags + - language + - baseUrl + - torrentId + - freeleech - match: - torrenturl: "{{ .baseUrl }}tor/download.php?tid={{ .torrentId }}" - torrentname: "{{ .torrentName }} by {{ .author }} [{{ .language }} / {{ .tags }}]" + match: + torrenturl: "/tor/download.php?tid={{ .torrentId }}" + torrentname: "{{ .torrentName }} by {{ .author }} [{{ .language }} / {{ .tags }}]" diff --git a/internal/indexer/definitions/ncore.yaml b/internal/indexer/definitions/ncore.yaml index 4ad73ac..57b357c 100644 --- a/internal/indexer/definitions/ncore.yaml +++ b/internal/indexer/definitions/ncore.yaml @@ -4,7 +4,7 @@ identifier: ncore description: nCore language: en-us urls: - - https://ncore.pro + - https://ncore.pro/ privacy: private protocol: torrent supports: @@ -53,20 +53,20 @@ irc: label: Invite command help: Invite auth with the key from https://ncore.pro/irc.php. Replace IRCKEY -parse: - type: single - lines: - - test: - - "[NEW TORRENT in mp3] Artist name - Album name > 115.63 MiB in 17F > https://ncore.pro/torrents.php?action=details&id=0000000" - - "[NEW TORRENT in xvidser_hun] Some.Show.S02E67.RTLM.WEB-DL.H264.HUN-GROUP > 269.31 MiB in 2F > https://ncore.pro/torrents.php?action=details&id=0000000" - pattern: '\[NEW TORRENT in (.*)\] (.*) > (.*) in .* > (https?://ncore.pro.*action=).*id=(.*)' - vars: - - category - - torrentName - - torrentSize - - baseUrl - - torrentId + parse: + type: single + lines: + - test: + - "[NEW TORRENT in mp3] Artist name - Album name > 115.63 MiB in 17F > https://ncore.pro/torrents.php?action=details&id=0000000" + - "[NEW TORRENT in xvidser_hun] Some.Show.S02E67.RTLM.WEB-DL.H264.HUN-GROUP > 269.31 MiB in 2F > https://ncore.pro/torrents.php?action=details&id=0000000" + pattern: '\[NEW TORRENT in (.*)\] (.*) > (.*) in .* > (https?://ncore.pro.*action=).*id=(.*)' + vars: + - category + - torrentName + - torrentSize + - baseUrl + - torrentId - match: - # https://ncore.pro/torrents.php?action=download&id=0000&key=00000 - torrenturl: "{{ .baseUrl }}download&id={{ .torrentId }}&key={{ .passkey }}" + match: + # https://ncore.pro/torrents.php?action=download&id=0000&key=00000 + torrenturl: "/download&id={{ .torrentId }}&key={{ .passkey }}" diff --git a/internal/indexer/definitions/nebulance.yaml b/internal/indexer/definitions/nebulance.yaml index 5f24c12..bc47881 100644 --- a/internal/indexer/definitions/nebulance.yaml +++ b/internal/indexer/definitions/nebulance.yaml @@ -60,24 +60,24 @@ irc: label: Invite command help: Invite auth with Muffit. Replace USERNAME and IRCKEY. -parse: - type: single - lines: - - test: - - "[Episodes] The Show - S02E08 [WebRip / x264 / MKV / 720p / HD / VLAD / The.Show.S02E08.Episode.Name.720p.ANPL.WEBRip.AAC2.0.x264-GROUP.mkv] [702.00 MB - Uploader: UPLOADER] - http://nebulance.io/torrents.php?id=000 [Tags: comedy,subtitles,cbs]" - - "[Seasons] Other Show - S10 [HDTV / x264 / MKV / MP4 / 480p / SD / BTN / Other.Show.S10.HDTV.x264-GROUP] [5.27 GB - Uploader: UPLOADER] - http://nebulance.io/torrents.php?id=0000 [Tags: comedy,subtitles,cbs]" - - "[Episode] Late Night with Show Host - 2021-01-20 [WebDl / h264 / MKV / 1080p / HD / Scene / GROUP / talk.show.2021.01.20.famous.person.1080p.web.h264-group.mkv] [2.22 GB - Uploader: Uploader1] - http://nebulance.io/torrents.php?id=000000 [Tags: episode,comedy,talk.show,nbc,autofill,subtitles,webdl,h264,mkv,1080p,hd,scene,group.release]" - pattern: '\[(.*?)\] (.*?) - (?:S.*|\d{4}-\d{2}-\d{2}) \[(.*) \/ (.*)\] \[(.*?) - Uploader: (.*?)\] - (https?:\/\/.*)id=(\d+) \[Tags: (.*)\]' - vars: - - category - - title - - releaseTags - - torrentName - - torrentSize - - uploader - - baseUrl - - torrentId - - tags + parse: + type: single + lines: + - test: + - "[Episodes] The Show - S02E08 [WebRip / x264 / MKV / 720p / HD / VLAD / The.Show.S02E08.Episode.Name.720p.ANPL.WEBRip.AAC2.0.x264-GROUP.mkv] [702.00 MB - Uploader: UPLOADER] - http://nebulance.io/torrents.php?id=000 [Tags: comedy,subtitles,cbs]" + - "[Seasons] Other Show - S10 [HDTV / x264 / MKV / MP4 / 480p / SD / BTN / Other.Show.S10.HDTV.x264-GROUP] [5.27 GB - Uploader: UPLOADER] - http://nebulance.io/torrents.php?id=0000 [Tags: comedy,subtitles,cbs]" + - "[Episode] Late Night with Show Host - 2021-01-20 [WebDl / h264 / MKV / 1080p / HD / Scene / GROUP / talk.show.2021.01.20.famous.person.1080p.web.h264-group.mkv] [2.22 GB - Uploader: Uploader1] - http://nebulance.io/torrents.php?id=000000 [Tags: episode,comedy,talk.show,nbc,autofill,subtitles,webdl,h264,mkv,1080p,hd,scene,group.release]" + pattern: '\[(.+)\] (.+) - .+ \[(.+) \/ (.+)\] \[(.+) - Uploader: (.+)\] - (https?:\/\/.+\/).+id=(\d+) \[Tags: (.*)\]' + vars: + - category + - title + - releaseTags + - torrentName + - torrentSize + - uploader + - baseUrl + - torrentId + - tags - match: - torrenturl: "{{ .baseUrl }}action=download&id={{ .torrentId }}&authkey={{ .authkey }}&torrent_pass={{ .torrent_pass }}" + match: + torrenturl: "/torrents.php?action=download&id={{ .torrentId }}&authkey={{ .authkey }}&torrent_pass={{ .torrent_pass }}" diff --git a/internal/indexer/definitions/norbits.yaml b/internal/indexer/definitions/norbits.yaml index facbda8..607f05c 100644 --- a/internal/indexer/definitions/norbits.yaml +++ b/internal/indexer/definitions/norbits.yaml @@ -5,7 +5,7 @@ identifier: norbits description: NorBits is a Norwegian Private site for MOVIES / TV / GENERAL language: nb-NO urls: - - https://www.norbits.net + - https://www.norbits.net/ privacy: private protocol: torrent supports: @@ -47,20 +47,20 @@ irc: label: NickServ Password help: NickServ password -parse: - type: single - lines: - - test: - - "Ny torrent: Movie.2010.1080p.BluRay.x264.DTS-HD MA 5.1-OMEGA :: Kategori: Filmer/H.264/HD-1080p/i/Encode :: Scene: Nei :: St�rrelse: 9.69 GB :: https://norbits.net/details.php?id=000000" - - "Ny torrent: Some.TV.Show.s01e01.NORDIC.720p.DSNP.WEBRiP.DD.5.1.h264 :: Kategori: TV/H.264/HD-720p/Encode :: Scene: Nei :: St�rrelse: 891.04 MB :: https://norbits.net/details.php?id=000000" - pattern: 'Ny torrent: (.*) :: Kategori: (.*) :: Scene: (.*) :: St.+rrelse: (.*) :: (https?\:\/\/[^\/]+\/).*[\?]id=(\d+)' - vars: - - torrentName - - category - - scene - - torrentSize - - baseUrl - - torrentId + parse: + type: single + lines: + - test: + - "Ny torrent: Movie.2010.1080p.BluRay.x264.DTS-HD MA 5.1-OMEGA :: Kategori: Filmer/H.264/HD-1080p/i/Encode :: Scene: Nei :: St�rrelse: 9.69 GB :: https://norbits.net/details.php?id=000000" + - "Ny torrent: Some.TV.Show.s01e01.NORDIC.720p.DSNP.WEBRiP.DD.5.1.h264 :: Kategori: TV/H.264/HD-720p/Encode :: Scene: Nei :: St�rrelse: 891.04 MB :: https://norbits.net/details.php?id=000000" + pattern: 'Ny torrent: (.*) :: Kategori: (.*) :: Scene: (.*) :: St.+rrelse: (.*) :: (https?\:\/\/[^\/]+\/).*[\?]id=(\d+)' + vars: + - torrentName + - category + - scene + - torrentSize + - baseUrl + - torrentId - match: - torrenturl: "{{ .baseUrl }}download.php?id={{ .torrentId }}&passkey={{ .passkey }}" + match: + torrenturl: "/download.php?id={{ .torrentId }}&passkey={{ .passkey }}" diff --git a/internal/indexer/definitions/oppaitime.yaml b/internal/indexer/definitions/oppaitime.yaml index 22981ae..9fbe562 100644 --- a/internal/indexer/definitions/oppaitime.yaml +++ b/internal/indexer/definitions/oppaitime.yaml @@ -68,21 +68,21 @@ irc: # Audio # Other -parse: - type: single - lines: - - test: - - "[Manga] Kirisaki Byakko – Hatsujou Shitara Wakasagihime ni Omakase! [English] - https://oppaiti.me/torrents.php?id=9057 / https://oppaiti.me/torrents.php?action=download&id=10047 - futanari:female,kagerou.imaizumi:character, wakasagihime:character, sole.dickgirl:female, mermaid:female, monster.girl:female, sole.female:female, touhou.project:parody, big.breasts:female, wolf.girl:female" - - "[Games] Redamz – Monster Girl Island Halloween VR Build [Loose / English / Archived (zip) / Uncensored] - https://oppaiti.me/torrents.php?id=9064 / https://oppaiti.me/torrents.php?action=download&id=10064 - slime.girl,multiple.arms,robot.girl,virtual.reality,spider.girl,elf,catgirl,big.breasts,small.breasts,nukige" - pattern: '\[(\w+)\] (.+) – (.+) \[(.+)\] - https?:\/\/.* \/ (https?:\/\/.*\/)torrents\.php\?action=download&id=(\d+) - (.+)' - vars: - - category - - uploader - - torrentName - - releaseTags - - baseUrl - - torrentId - - tags + parse: + type: single + lines: + - test: + - "[Manga] Kirisaki Byakko – Hatsujou Shitara Wakasagihime ni Omakase! [English] - https://oppaiti.me/torrents.php?id=9057 / https://oppaiti.me/torrents.php?action=download&id=10047 - futanari:female,kagerou.imaizumi:character, wakasagihime:character, sole.dickgirl:female, mermaid:female, monster.girl:female, sole.female:female, touhou.project:parody, big.breasts:female, wolf.girl:female" + - "[Games] Redamz – Monster Girl Island Halloween VR Build [Loose / English / Archived (zip) / Uncensored] - https://oppaiti.me/torrents.php?id=9064 / https://oppaiti.me/torrents.php?action=download&id=10064 - slime.girl,multiple.arms,robot.girl,virtual.reality,spider.girl,elf,catgirl,big.breasts,small.breasts,nukige" + pattern: '\[(\w+)\] (.+) – (.+) \[(.+)\] - https?:\/\/.* \/ (https?:\/\/.*\/)torrents\.php\?action=download&id=(\d+) - (.+)' + vars: + - category + - uploader + - torrentName + - releaseTags + - baseUrl + - torrentId + - tags - match: - torrenturl: "{{ .baseUrl }}torrents.php?action=download&id={{ .torrentId }}&authkey={{ .authkey }}&torrent_pass={{ .torrent_pass }}" + match: + torrenturl: "/torrents.php?action=download&id={{ .torrentId }}&authkey={{ .authkey }}&torrent_pass={{ .torrent_pass }}" diff --git a/internal/indexer/definitions/orpheus.yaml b/internal/indexer/definitions/orpheus.yaml index d3b81d9..0d50c75 100644 --- a/internal/indexer/definitions/orpheus.yaml +++ b/internal/indexer/definitions/orpheus.yaml @@ -54,20 +54,21 @@ irc: label: Invite command help: Invite auth with Hermes. Replace USERNAME and IRCKEY. -parse: - type: single - lines: - - test: - - "TORRENT: That Artist - Albuum [2002] [Single] - FLAC / Lossless / WEB - 2000s,house,uk.garage,garage.house - https://orpheus.network/torrents.php?id=000000 / https://orpheus.network/torrents.php?action=download&id=0000000" - - "TORRENT: Something [2021] [Album] - FLAC / Lossless / CD - - https://orpheus.network/torrents.php?id=000000 / https://orpheus.network/torrents.php?action=download&id=0000000" - pattern: 'TORRENT: (.*) \[(.+?)\] \[(.+?)\] - (.*) - \s*(.*) - https?:\/\/.* \/ (https?:\/\/.*id=\d+)' - vars: - - torrentName - - year - - category - - releaseTags - - tags - - baseUrl + parse: + type: single + lines: + - test: + - "TORRENT: That Artist - Albuum [2002] [Single] - FLAC / Lossless / WEB - 2000s,house,uk.garage,garage.house - https://orpheus.network/torrents.php?id=000000 / https://orpheus.network/torrents.php?action=download&id=0000000" + - "TORRENT: Something [2021] [Album] - FLAC / Lossless / CD - - https://orpheus.network/torrents.php?id=000000 / https://orpheus.network/torrents.php?action=download&id=0000000" + pattern: 'TORRENT: (.*) \[(.+?)\] \[(.+?)\] - (.*) - \s*(.*) - https?:\/\/.* \/ (https?:\/\/.+\/).+id=(\d+)' + vars: + - torrentName + - year + - category + - releaseTags + - tags + - baseUrl + - torrentId - match: - torrenturl: "{{ .baseUrl }}&torrent_pass={{ .torrent_pass }}" + match: + torrenturl: "/torrents.php?action=download&id={{ .torrentId }}&torrent_pass={{ .torrent_pass }}" diff --git a/internal/indexer/definitions/pbay.yaml b/internal/indexer/definitions/pbay.yaml index 4631341..5ab1e97 100644 --- a/internal/indexer/definitions/pbay.yaml +++ b/internal/indexer/definitions/pbay.yaml @@ -5,7 +5,7 @@ identifier: pornbay description: Pornbay (PB) is a private torrent tracker for XXX language: en-us urls: - - https://pornbay.org + - https://pornbay.org/ privacy: private protocol: torrent supports: @@ -53,20 +53,20 @@ irc: label: NickServ Password help: NickServ password -parse: - type: single - lines: - - test: - - "[XXX-Cateogry] [SomeXXXSite] Wow So Much Come [2015-05-30, 3K, 1500p] [4.77 GB - Uploader: Tester] - https://pornbay.org/torrents.php?id=000000" - - "[XXX-Category-2] SomeXXXSite - Some Name [1.35 GB - Uploader: someUploader] - https://pornbay.org/torrents.php?id=000000" - pattern: '^\[(.*?)\] (.*) \[([0-9]+?.*?) - Uploader: (.*?)\] - (https://.*torrents.php\?)id=(.*)$' - vars: - - category - - torrentName - - torrentSize - - uploader - - baseUrl - - torrentId + parse: + type: single + lines: + - test: + - "[XXX-Cateogry] [SomeXXXSite] Wow So Much Come [2015-05-30, 3K, 1500p] [4.77 GB - Uploader: Tester] - https://pornbay.org/torrents.php?id=000000" + - "[XXX-Category-2] SomeXXXSite - Some Name [1.35 GB - Uploader: someUploader] - https://pornbay.org/torrents.php?id=000000" + pattern: '\[(.+)\] (.*) \[([0-9]+?.*?) - Uploader: (.+)\] - (https:\/\/.+\/)torrents.php\?id=(\d+)' + vars: + - category + - torrentName + - torrentSize + - uploader + - baseUrl + - torrentId - match: - torrenturl: "{{ .baseUrl }}action=download&id={{ .torrentId }}&authkey={{ .authkey }}&torrent_pass={{ .torrent_pass }}" + match: + torrenturl: "/torrents.php?action=download&id={{ .torrentId }}&authkey={{ .authkey }}&torrent_pass={{ .torrent_pass }}" diff --git a/internal/indexer/definitions/polishsource.yaml b/internal/indexer/definitions/polishsource.yaml index 20071eb..ba739c5 100644 --- a/internal/indexer/definitions/polishsource.yaml +++ b/internal/indexer/definitions/polishsource.yaml @@ -5,7 +5,7 @@ identifier: polishsource description: PolishSource (PS) is a POLISH private torrent tracker for 0DAY / GENERAL. language: en-us urls: - - https://polishsource.cz + - https://polishsource.cz/ privacy: private protocol: torrent supports: @@ -54,22 +54,22 @@ irc: label: Invite command help: Invite auth with PS-Info. Replace IRCKEY with your IRC key. + parse: + type: single + lines: + - test: + - "Some.Show.S09E01.HDTV.x264-GROUP > TV/SD > 359.285 MB / 2 F > [ http://polishsource.cz/details.php?id=000000 ]-[ 5h 25min 15sec after pre ]" + - "Some.Movie.2011.DVDRip.x264-GROUP2 > Movies/x264 (Documentary) > 563.296 MB / 2 F > [ http://polishsource.cz/details.php?id=000000 ]-[ 2min 48sec after pre ]" + pattern: '(.*) > (.*) > (.*) \/.*>\s*\[ (https?\:\/\/.+\/).*[&?]id=(\d+)\s\](?:-\[ (.*) \])?' + vars: + - torrentName + - category + - torrentSize + - baseUrl + - torrentId + - preTime -parse: - type: single - lines: - - test: - - "Some.Show.S09E01.HDTV.x264-GROUP > TV/SD > 359.285 MB / 2 F > [ http://polishsource.cz/details.php?id=000000 ]-[ 5h 25min 15sec after pre ]" - - "Some.Movie.2011.DVDRip.x264-GROUP2 > Movies/x264 (Documentary) > 563.296 MB / 2 F > [ http://polishsource.cz/details.php?id=000000 ]-[ 2min 48sec after pre ]" - pattern: '(.*)\s>\s(.*)\s>\s(.*) \/.*>\s*\[ https?\:\/\/([^\/]+)\/.*[&?]id=(\d+)\s\](?:-\[ (.*) \])?' - vars: + match: + torrenturl: "/downloadssl.php?id={{ .torrentId }}&torr={{ .torrentName }}.torrent&passkey={{ .passkey }}" + encode: - torrentName - - category - - torrentSize - - baseUrl - - torrentId - - match: - torrenturl: "https://{{ .baseUrl }}/downloadssl.php?id={{ .torrentId }}&torr={{ .torrentName }}.torrent&passkey={{ .passkey }}" - encode: - - torrentName diff --git a/internal/indexer/definitions/polishtracker.yaml b/internal/indexer/definitions/polishtracker.yaml index 27e7408..272e37a 100644 --- a/internal/indexer/definitions/polishtracker.yaml +++ b/internal/indexer/definitions/polishtracker.yaml @@ -5,7 +5,7 @@ identifier: polishtracker description: PolishTracker (PT) is a POLISH private torrent tracker for 0DAY / GENERAL. language: en-us urls: - - https://pte.nu + - https://pte.nu/ privacy: private protocol: torrent supports: @@ -54,20 +54,20 @@ irc: label: Invite command help: Invite auth with PT-BOT. Replace IRCKEY with your IRC key. -parse: - type: single - lines: - - test: - - "::: PolishTracker ::: Torrent ( Some.Movie.2017.PLSUB.1080p.BDRip.x264-GROUP ) || Kategoria: ( movies HD ) || Rozmiar: ( 2.14 GB ) || Link: ( https://pte.nu/torrents/000000 ) || Wiecej: ( http://www.filmweb.pl/film?id=000000 )" - - "::: PolishTracker ::: Torrent ( Some.Other.Movie.1985.iNTERNAL.BDRip.x264-GROUP ) || Kategoria: ( movies SD ) || Rozmiar: ( 1.15 GB ) || Link: ( https://pte.nu/torrents/000000 )" - - "::: PolishTracker ::: Torrent ( Some.Other.Movie.1985.iNTERNAL.720p.BluRay.x264-GROUP ) || Kategoria: ( movies HD ) || Rozmiar: ( 5.02 GB ) || Link: ( https://pte.nu/torrents/000000 )" - pattern: '::: PolishTracker ::: Torrent \( (.*) \) \|\| Kategoria: \( (.*) \) \|\| Rozmiar: \( (.*) \) \|\| Link: \( (https://.*)/torrents/(\d+) \)' - vars: - - torrentName - - category - - torrentSize - - baseUrl - - torrentId + parse: + type: single + lines: + - test: + - "::: PolishTracker ::: Torrent ( Some.Movie.2017.PLSUB.1080p.BDRip.x264-GROUP ) || Kategoria: ( movies HD ) || Rozmiar: ( 2.14 GB ) || Link: ( https://pte.nu/torrents/000000 ) || Wiecej: ( http://www.filmweb.pl/film?id=000000 )" + - "::: PolishTracker ::: Torrent ( Some.Other.Movie.1985.iNTERNAL.BDRip.x264-GROUP ) || Kategoria: ( movies SD ) || Rozmiar: ( 1.15 GB ) || Link: ( https://pte.nu/torrents/000000 )" + - "::: PolishTracker ::: Torrent ( Some.Other.Movie.1985.iNTERNAL.720p.BluRay.x264-GROUP ) || Kategoria: ( movies HD ) || Rozmiar: ( 5.02 GB ) || Link: ( https://pte.nu/torrents/000000 )" + pattern: '::: PolishTracker ::: Torrent \( (.+) \) \|\| Kategoria: \( (.+) \) \|\| Rozmiar: \( (.+) \) \|\| Link: \( (https:\/\/.+\/)torrents\/(\d+) \)' + vars: + - torrentName + - category + - torrentSize + - baseUrl + - torrentId - match: - torrenturl: "{{ .baseUrl }}/downrss/{{ .rsskey }}/{{ .torrentId }}" + match: + torrenturl: "/downrss/{{ .rsskey }}/{{ .torrentId }}" diff --git a/internal/indexer/definitions/ptm.yaml b/internal/indexer/definitions/ptm.yaml index a3dc5ae..03b45a9 100644 --- a/internal/indexer/definitions/ptm.yaml +++ b/internal/indexer/definitions/ptm.yaml @@ -48,22 +48,22 @@ irc: label: NickServ Password help: NickServ password -parse: - type: single - lines: - - test: - - "tehFire: [Applications|Windows] Chen went to the Mall :: preGAP: 1m and 32s :: https://pretome.info/details.php?id=696969" - - "[Movies|x264] Orlando.Bloom.Had.A.Cow-ze0s :: preGAP: P2P source :: https://pretome.info/details.php?id=646321" - - "tehFIRE: [TV|XviD] Royal.Institution.Christmas.Lectures.2009.Part2.WS.PDTV.XviD-WATERS :: preGAP: 1m and 9s :: https://pretome.info/details.php?id=127107" - - "tehFIRE: [TV|x264] Newsreaders.S01E05.HDTV.x264-2HD https://pretome.info/details.php?id=333951" - pattern: '\[([^\]]+)\] ([^:]+)(?: :: [^:]+:.* :: )?(https?\:\/\/[^\/]+).*id=(\d+)' - vars: - - category - - torrentName - - baseUrl - - torrentId + parse: + type: single + lines: + - test: + - "tehFire: [Applications|Windows] Chen went to the Mall :: preGAP: 1m and 32s :: https://pretome.info/details.php?id=696969" + - "[Movies|x264] Orlando.Bloom.Had.A.Cow-GROUP :: preGAP: P2P source :: https://pretome.info/details.php?id=646321" + - "tehFIRE: [TV|XviD] Royal.Institution.Christmas.Lectures.2009.Part2.WS.PDTV.XviD-WATERS :: preGAP: 1m and 9s :: https://pretome.info/details.php?id=127107" + - "tehFIRE: [TV|x264] Newsreaders.S01E05.HDTV.x264-2HD https://pretome.info/details.php?id=333951" + pattern: '\[([^\]]+)\] ([^:]+)(?: :: [^:]+:.* :: )?(https?\:\/\/.+\/).*id=(\d+)' + vars: + - category + - torrentName + - baseUrl + - torrentId - match: - torrenturl: "{{ .baseUrl }}/download.php/{{ .torrentId }}/{{ .rsskey }}/{{ .torrentName }}.torrent" - encode: - - torrentName + match: + torrenturl: "/download.php/{{ .torrentId }}/{{ .rsskey }}/{{ .torrentName }}.torrent" + encode: + - torrentName diff --git a/internal/indexer/definitions/ptp.yaml b/internal/indexer/definitions/ptp.yaml index 67551b4..9dafce4 100644 --- a/internal/indexer/definitions/ptp.yaml +++ b/internal/indexer/definitions/ptp.yaml @@ -5,7 +5,7 @@ identifier: ptp description: PassThePopcorn (PTP) is a private torrent tracker for MOVIES language: en-us urls: - - https://passthepopcorn.me + - https://passthepopcorn.me/ privacy: private protocol: torrent supports: @@ -89,19 +89,19 @@ irc: label: Invite command help: Invite auth with Hummingbird. Replace USERNAME and IRCKEY. -parse: - type: single - lines: - - test: - - "That Movie [1972] by Some Director | x264 / Blu-ray / MKV / 1080p | 204371 | 964303 | That.Movie.1972.1080p.BluRay.FLAC.x264-GROUP | comedy, drama, romance" - - "That Other Movie [1972] | x264 / Blu-ray / MKV / 1080p | 204371 | 964303 | That.Other.Movie.1972.1080p.BluRay.FLAC.x264-GROUP | comedy, drama, romance" - pattern: '.* \[(.*)\] (?:by .*)?\| (.*) \| .* \| (.*) \| (.*) \| (.*)' - vars: - - year - - releaseTags - - torrentId - - torrentName - - tags + parse: + type: single + lines: + - test: + - "That Movie [1972] by Some Director | x264 / Blu-ray / MKV / 1080p | 204371 | 964303 | That.Movie.1972.1080p.BluRay.FLAC.x264-GROUP | comedy, drama, romance" + - "That Other Movie [1972] | x264 / Blu-ray / MKV / 1080p | 204371 | 964303 | That.Other.Movie.1972.1080p.BluRay.FLAC.x264-GROUP | comedy, drama, romance" + pattern: '.* \[(.*)\] (?:by .*)?\| (.*) \| .* \| (.*) \| (.*) \| (.*)' + vars: + - year + - releaseTags + - torrentId + - torrentName + - tags - match: - torrenturl: "https://passthepopcorn.me/torrents.php?action=download&id={{ .torrentId }}&authkey={{ .authkey }}&torrent_pass={{ .torrent_pass }}" + match: + torrenturl: "/torrents.php?action=download&id={{ .torrentId }}&authkey={{ .authkey }}&torrent_pass={{ .torrent_pass }}" diff --git a/internal/indexer/definitions/pussytorrents.yaml b/internal/indexer/definitions/pussytorrents.yaml index 8e3d6b6..ec761dd 100644 --- a/internal/indexer/definitions/pussytorrents.yaml +++ b/internal/indexer/definitions/pussytorrents.yaml @@ -48,22 +48,21 @@ irc: label: NickServ Password help: NickServ password -parse: - type: single - lines: - - test: - - "New Torrent Announcement: Name:'BsBigHouse 12 12 21 Kyle Comes To Play XXX 480i MP2 YUSUF' uploaded by 'Anonymous' - https://www.pussytorrents.org/torrent/69" - - "New Torrent Announcement: Name:'BadBus 8 9 98 carter and the lemon XXX 576p MP4 CatStevens' uploaded by 'Anonymous' - https://www.pussytorrents.org/torrent/96" - pattern: New Torrent Announcement:\s*Name:'(.*)' uploaded by '([^']*)'\s*(freeleech)*\s*-\s*(https?\:\/\/[^\/]+\/)torrent\/(\d+) - vars: + parse: + type: single + lines: + - test: + - "New Torrent Announcement: Name:'BsBigHouse 12 12 21 Kyle Comes To Play XXX 480i MP2 YUSUF' uploaded by 'Anonymous' - https://www.pussytorrents.org/torrent/69" + - "New Torrent Announcement: Name:'BadBus 8 9 98 carter and the lemon XXX 576p MP4 CatStevens' uploaded by 'Anonymous' - https://www.pussytorrents.org/torrent/96" + pattern: New Torrent Announcement:\s*Name:'(.*)' uploaded by '([^']*)'\s*(freeleech)*\s*-\s*(https?\:\/\/[^\/]+\/)torrent\/(\d+) + vars: + - torrentName + - uploader + - freeleech + - baseUrl + - torrentId + + match: + torrenturl: "/rss/download/{{ .torrentId }}/{{ .rsskey }}/{{ .torrentName }}.torrent" + encode: - torrentName - - uploader - - freeleech - - baseUrl - - torrentId - - match: - torrenturl: "{{ .baseUrl }}rss/download/{{ .torrentId }}/{{ .rsskey }}/{{ .torrentName }}.torrent" - encode: - - torrentName - diff --git a/internal/indexer/definitions/red.yaml b/internal/indexer/definitions/red.yaml index 386134b..2f2e500 100644 --- a/internal/indexer/definitions/red.yaml +++ b/internal/indexer/definitions/red.yaml @@ -79,21 +79,21 @@ irc: label: Invite command help: Invite auth with Drone. Replace USERNAME and IRCKEY. -parse: - type: single - lines: - - test: - - "Artist - Albumname [2008] [Single] - FLAC / Lossless / Log / 100% / Cue / CD - https://redacted.ch/torrents.php?id=0000000 / https://redacted.ch/torrents.php?action=download&id=0000000 - hip.hop,rhythm.and.blues,2000s" - - "A really long name here - Concertos 5 and 6, Suite No 2 [1991] [Album] - FLAC / Lossless / Log / 100% / Cue / CD - https://redacted.ch/torrents.php?id=0000000 / https://redacted.ch/torrents.php?action=download&id=0000000 - classical" - pattern: '(.*) (?:\[(.*)\] \[(.*)\] - (.*))? .* \/ (https?\:\/\/.*id=(\d+))\s* -\s*(.*)' - vars: - - torrentName - - year - - category - - releaseTags - - baseUrl - - torrentId - - tags + parse: + type: single + lines: + - test: + - "Artist - Albumname [2008] [Single] - FLAC / Lossless / Log / 100% / Cue / CD - https://redacted.ch/torrents.php?id=0000000 / https://redacted.ch/torrents.php?action=download&id=0000000 - hip.hop,rhythm.and.blues,2000s" + - "A really long name here - Concertos 5 and 6, Suite No 2 [1991] [Album] - FLAC / Lossless / Log / 100% / Cue / CD - https://redacted.ch/torrents.php?id=0000000 / https://redacted.ch/torrents.php?action=download&id=0000000 - classical" + pattern: '(.*) (?:\[(.*)\] \[(.*)\] - (.*))? .* \/ (https?\:\/\/.+\/).+id=(\d+) - (.+)' + vars: + - torrentName + - year + - category + - releaseTags + - baseUrl + - torrentId + - tags - match: - torrenturl: "{{ .baseUrl }}&authkey={{ .authkey }}&torrent_pass={{ .torrent_pass }}" + match: + torrenturl: "/torrents.php?action=download&id={{ .torrentId }}&authkey={{ .authkey }}&torrent_pass={{ .torrent_pass }}" diff --git a/internal/indexer/definitions/retroflix.yaml b/internal/indexer/definitions/retroflix.yaml index b0cfc2b..d916e9f 100644 --- a/internal/indexer/definitions/retroflix.yaml +++ b/internal/indexer/definitions/retroflix.yaml @@ -5,7 +5,7 @@ identifier: retroflix description: RetroFlix (RFX) is a private torrent tracker for CLASSIC MOVIES / TV / GENERAL language: en-us urls: - - https://retroflix.club + - https://retroflix.club/ privacy: private protocol: torrent supports: @@ -50,21 +50,21 @@ irc: label: NickServ Password help: NickServ password -parse: - type: single - lines: - - test: - - "New! (Movies) - [REQUESTED].French.Movie.(1978).(French.with.English.Subtitles) - (18.76 GB) - https://retroflix.club/browse/t/00000/french-movie-1978-french-with-english-subtitles" - - "New! (Movies) - Old.Movie.1967.1080p.BluRay.x265.10bit-GROUP1 - (5.42 GB) - https://retroflix.club/browse/t/00000/old-movie-1967-1080p-bluray-x265-10bit-group1" - pattern: ^New! \((.*)\) - (.*) - \((.*)\) - (https?:\/\/.*\/)browse/t/(\d+).* - vars: - - category - - torrentName - - torrentSize - - baseUrl - - torrentId + parse: + type: single + lines: + - test: + - "New! (Movies) - [REQUESTED].French.Movie.(1978).(French.with.English.Subtitles) - (18.76 GB) - https://retroflix.club/browse/t/00000/french-movie-1978-french-with-english-subtitles" + - "New! (Movies) - Old.Movie.1967.1080p.BluRay.x265.10bit-GROUP1 - (5.42 GB) - https://retroflix.club/browse/t/00000/old-movie-1967-1080p-bluray-x265-10bit-group1" + pattern: ^New! \((.*)\) - (.*) - \((.*)\) - (https?:\/\/.*\/)browse/t/(\d+).* + vars: + - category + - torrentName + - torrentSize + - baseUrl + - torrentId - match: - torrenturl: "{{ .baseUrl }}download.php?id={{ .torrentId }}&passkey={{ .passkey }}" - encode: - - torrentName + match: + torrenturl: "/download.php?id={{ .torrentId }}&passkey={{ .passkey }}" + encode: + - torrentName diff --git a/internal/indexer/definitions/revolutiontt.yaml b/internal/indexer/definitions/revolutiontt.yaml index ea29929..57144f9 100644 --- a/internal/indexer/definitions/revolutiontt.yaml +++ b/internal/indexer/definitions/revolutiontt.yaml @@ -5,7 +5,7 @@ identifier: revolutiontt description: RevolutionTT (RTT) is a private torrent tracker for 0DAY / GENERAL. language: en-us urls: - - https://www.revolutiontt.me + - https://www.revolutiontt.me/ privacy: private protocol: torrent supports: @@ -54,22 +54,20 @@ irc: label: Invite command help: Invite auth with RevoTT. Replace USERNAME and PASSKEY -parse: - type: single - lines: - - test: - - "!new Some.TV.Show.S01E02.720p.WEB.h264-KOGi | TV/HDx264 | https://revolutiontt.me/details.php?id=z4WBMrhj&hit=1" - - "!new Some.Other.Show.S01E02.1080p.WEB.h264-KOGi | TV/HDx264 | https://revolutiontt.me/details.php?id=eAg24buk&hit=1" - pattern: '!new (.*) \| (.*) \| (https?:\/\/.*\/).*id=([0-9a-zA-Z]+)' - vars: + parse: + type: single + lines: + - test: + - "!new Some.TV.Show.S01E02.720p.WEB.h264-KOGi | TV/HDx264 | https://revolutiontt.me/details.php?id=z4WBMrhj&hit=1" + - "!new Some.Other.Show.S01E02.1080p.WEB.h264-KOGi | TV/HDx264 | https://revolutiontt.me/details.php?id=eAg24buk&hit=1" + pattern: '!new (.*) \| (.*) \| (https?:\/\/.*\/).*id=([0-9a-zA-Z]+)' + vars: + - torrentName + - category + - baseUrl + - torrentId + + match: + torrenturl: "/download.php/{{ .torrentId }}/{{ .torrentName }}.torrent?passkey={{ .passkey }}" + encode: - torrentName - - category - - baseUrl - - torrentId - - match: - torrenturl: "{{ .baseUrl }}download.php/{{ .torrentId }}/{{ .torrentName }}.torrent?passkey={{ .passkey }}" - encode: - - torrentName - - diff --git a/internal/indexer/definitions/scenehd.yaml b/internal/indexer/definitions/scenehd.yaml index bce0e09..1237c2e 100644 --- a/internal/indexer/definitions/scenehd.yaml +++ b/internal/indexer/definitions/scenehd.yaml @@ -5,7 +5,7 @@ identifier: scenehd description: SceneHD (SCHD) is a private torrent tracker for HD MOVIES / TV. language: en-us urls: - - https://scenehd.org + - https://scenehd.org/ privacy: private protocol: torrent supports: @@ -54,17 +54,17 @@ irc: label: Invite command help: Invite auth with SceneHD. Replace IRCKEY with your IRC key -parse: - type: single - lines: - - test: - - "[NEW] Some.Show.S08E20.EXTENDED.720p.BluRay.X264-GROUP [TV/720] https://scenehd.org/details.php?id=00000" - pattern: '\[NEW] (.*) \[([^\]]+)] (https?\:\/\/[^\/]+)\/.*[&\?]id=(\d+)' - vars: - - torrentName - - category - - baseUrl - - torrentId + parse: + type: single + lines: + - test: + - "[NEW] Some.Show.S08E20.EXTENDED.720p.BluRay.X264-GROUP [TV/720] https://scenehd.org/details.php?id=00000" + pattern: '\[NEW] (.+) \[(.+)] (https?\:\/\/.+\/).*id=(\d+)' + vars: + - torrentName + - category + - baseUrl + - torrentId - match: - torrenturl: "{{ .baseUrl }}/download.php?id={{ .torrentId }}&passkey={{ .passkey }}" + match: + torrenturl: "/download.php?id={{ .torrentId }}&passkey={{ .passkey }}" diff --git a/internal/indexer/definitions/speedapp.yaml b/internal/indexer/definitions/speedapp.yaml index 15e93c0..6d34ca8 100644 --- a/internal/indexer/definitions/speedapp.yaml +++ b/internal/indexer/definitions/speedapp.yaml @@ -46,19 +46,19 @@ irc: label: NickServ Password help: NickServ password -parse: - type: single - lines: - - test: - - "New! (Movies HD-RO) - Some.File.2022.1080p.WEB-DL.DDP5.1.Atmos.H.264.mkv - (5.14 GB) - https://speedapp.io/browse/00000/t/some-file-2022-1080p-web-dl-ddp5-1-atmos-h-264-mkv" - - "New! (XXX HD) - Some.XXX.21.05.19.famous.actress.XXX.1080p.MP4-WRB - (841.64 MB) - https://speedapp.io/browse/000000/t/some-xxx-21-05-19-famous-actress-xxx-1080p-mp4-wrb" - pattern: 'New! \((.*)\) - (.*) - \((.*)\) - (https?:\/\/.*)\/browse/(\d+)/t/(.*)' - vars: - - category - - torrentName - - torrentSize - - baseUrl - - torrentId + parse: + type: single + lines: + - test: + - "New! (Movies HD-RO) - Some.File.2022.1080p.WEB-DL.DDP5.1.Atmos.H.264.mkv - (5.14 GB) - https://speedapp.io/browse/00000/t/some-file-2022-1080p-web-dl-ddp5-1-atmos-h-264-mkv" + - "New! (XXX HD) - Some.XXX.21.05.19.famous.actress.XXX.1080p.MP4-WRB - (841.64 MB) - https://speedapp.io/browse/000000/t/some-xxx-21-05-19-famous-actress-xxx-1080p-mp4-wrb" + pattern: 'New! \((.+)\) - (.+) - \((.+)\) - (https?:\/\/.+\/)browse\/(\d+)\/t\/(.+)' + vars: + - category + - torrentName + - torrentSize + - baseUrl + - torrentId - match: - torrenturl: "{{ .baseUrl }}/rss/download/{{ .torrentId }}/{{ .torrentName }}.torrent?passkey={{ .passkey }}" + match: + torrenturl: "/rss/download/{{ .torrentId }}/{{ .torrentName }}.torrent?passkey={{ .passkey }}" diff --git a/internal/indexer/definitions/subsplease.yaml b/internal/indexer/definitions/subsplease.yaml index f81ffc1..a7518e7 100644 --- a/internal/indexer/definitions/subsplease.yaml +++ b/internal/indexer/definitions/subsplease.yaml @@ -5,7 +5,7 @@ identifier: subsplease description: SubsPlease is an indexer for Anime. language: en-us urls: - - https://subsplease.org + - https://subsplease.org/ privacy: public protocol: torrent supports: @@ -41,16 +41,16 @@ irc: label: NickServ Password help: NickServ password -parse: - type: single - lines: - - pattern: '\[Release\] (.*(SubsPlease).*.(mkv)) \((.*)\) - .* - (.*)' - vars: - - torrentName - - releaseGroup - - releaseTags - - torrentSize - - torrentUrl + parse: + type: single + lines: + - pattern: '\[Release\] (.*(SubsPlease).*.(mkv)) \((.*)\) - .* - (.*)' + vars: + - torrentName + - releaseGroup + - releaseTags + - torrentSize + - torrentUrl - match: - torrenturl: "{{.torrentUrl}}" + match: + torrenturl: "{{ .torrentUrl }}" diff --git a/internal/indexer/definitions/superbits.yaml b/internal/indexer/definitions/superbits.yaml index 5cb1a4d..6fac733 100644 --- a/internal/indexer/definitions/superbits.yaml +++ b/internal/indexer/definitions/superbits.yaml @@ -47,21 +47,21 @@ irc: label: NickServ Password help: NickServ password -parse: - type: single - lines: - - test: - - "-[archive Film 1080]2[A.Movie.1985.FRENCH.1080p.BluRay.x264-GROUP]3[000000]4[Size: 4.41 GB]5[FL: no]6[Scene: yes]" - - "-[new TV]2[Some.Show.S05E05.720p.WEB.h264-GROUP]3[000000]4[Size: 964.04 MB]5[FL: no]6[Scene: yes]7[Pred 1m 30s ago]" - pattern: '\-\[(.*)\]2\[(.*)\]3\[(\d+)\]4\[Size\:\s(.*)\]5\[FL\:\s(no|yes)\]6\[Scene\:\s(no|yes)\](?:7\[Pred\s(.*)\sago\])?' - vars: - - category - - torrentName - - torrentId - - torrentSize - - freeleech - - scene - - preTime + parse: + type: single + lines: + - test: + - "-[archive Film 1080]2[A.Movie.1985.FRENCH.1080p.BluRay.x264-GROUP]3[000000]4[Size: 4.41 GB]5[FL: no]6[Scene: yes]" + - "-[new TV]2[Some.Show.S05E05.720p.WEB.h264-GROUP]3[000000]4[Size: 964.04 MB]5[FL: no]6[Scene: yes]7[Pred 1m 30s ago]" + pattern: '\-\[(.*)\]2\[(.*)\]3\[(\d+)\]4\[Size\:\s(.*)\]5\[FL\:\s(no|yes)\]6\[Scene\:\s(no|yes)\](?:7\[Pred\s(.*)\sago\])?' + vars: + - category + - torrentName + - torrentId + - torrentSize + - freeleech + - scene + - preTime - match: - torrenturl: "https://superbits.org/download.php?id={{ .torrentId }}&passkey={{ .passkey }}" + match: + torrenturl: "/download.php?id={{ .torrentId }}&passkey={{ .passkey }}" diff --git a/internal/indexer/definitions/torrentbytes.yaml b/internal/indexer/definitions/torrentbytes.yaml index bd01f0d..8f8571b 100644 --- a/internal/indexer/definitions/torrentbytes.yaml +++ b/internal/indexer/definitions/torrentbytes.yaml @@ -54,20 +54,20 @@ irc: label: Invite command help: Invite auth with Erica, please replace USERNAME and IRCKEY. -parse: - type: single - lines: - - test: - - "[TB-RLS] .:. [ The.New.Game-GROUP ] .:. [ https://www.torrentbytes.net/download.php?id=0000000 ] .:. [ https://www.torrentbytes.net/details.php?id=0000000 ] .:. [ Uploaded 2 minutes, 12 seconds after pre ]" - pattern: '^\[TB-RLS\] \.:\. \[ (.*) \] \.:\. \[ https?\:\/\/([^\/]+\/).*id=(\d+).*https?\:\/\/(?:.*\[ Uploaded (.*)\])?' - vars: - - torrentName - - baseUrl - - torrentId - - preTime + parse: + type: single + lines: + - test: + - "[TB-RLS] .:. [ The.New.Game-GROUP ] .:. [ https://www.torrentbytes.net/download.php?id=0000000 ] .:. [ https://www.torrentbytes.net/details.php?id=0000000 ] .:. [ Uploaded 2 minutes, 12 seconds after pre ]" + pattern: '^\[TB-RLS\] \.:\. \[ (.*) \] \.:\. \[ https?\:\/\/([^\/]+\/).*id=(\d+).*https?\:\/\/(?:.*\[ Uploaded (.*)\])?' + vars: + - torrentName + - baseUrl + - torrentId + - preTime - match: - torrenturl: "{{ .baseUrl }}download.php?id={{ .torrentId }}&SSL=1&name={{ .torrentName }}.torrent" - cookie: true - encode: - - torrentName \ No newline at end of file + match: + torrenturl: "/download.php?id={{ .torrentId }}&SSL=1&name={{ .torrentName }}.torrent" + cookie: true + encode: + - torrentName \ No newline at end of file diff --git a/internal/indexer/definitions/torrentday.yaml b/internal/indexer/definitions/torrentday.yaml index fc55a8c..0158f1a 100644 --- a/internal/indexer/definitions/torrentday.yaml +++ b/internal/indexer/definitions/torrentday.yaml @@ -5,7 +5,15 @@ identifier: torrentday description: TorrentDay (TD) is a private torrent tracker for GENERAL. language: en-us urls: - - https://www.torrentday.com + - https://www.torrentday.com/ + - https://tday.love/ + - https://secure.torrentday.com/ + - https://classic.torrentday.com/ + - https://torrentday.it/ + - https://td.findnemo.net/ + - https://td.getcrazy.me/ + - https://td.venom.global/ + - https://td.workisboring.net/ privacy: private protocol: torrent supports: @@ -47,22 +55,22 @@ irc: label: NickServ Password help: NickServ password -parse: - type: single - lines: - - test: - - "[Movie/4K] This is a Movie 2160p UHD BluRay x265-TEST - https://www.torrentday.com/details.php?id=0000000 - 5.83 GB" - - "[Movie/4K] This is a Movie 2160p UHD BluRay x265-TEST FREELEECH - https://www.torrentday.com/details.php?id=0000000 - 5.83 GB" - pattern: '\[([^\]]*)] (.*?)\s*(FREELEECH)*\s*-\s+(https?\:\/\/[^\/]+).*[&\?]id=(\d+)\s*- (.*)' - vars: - - category - - torrentName - - freeleech - - baseUrl - - torrentId - - torrentSize + parse: + type: single + lines: + - test: + - "[Movie/4K] This is a Movie 2160p UHD BluRay x265-TEST - https://www.torrentday.com/details.php?id=0000000 - 5.83 GB" + - "[Movie/4K] This is a Movie 2160p UHD BluRay x265-TEST FREELEECH - https://www.torrentday.com/details.php?id=0000000 - 5.83 GB" + pattern: '\[([^\]]*)] (.*?)\s*(FREELEECH)*\s*-\s+(https?\:\/\/[^\/]+\/).*[&\?]id=(\d+)\s*- (.*)' + vars: + - category + - torrentName + - freeleech + - baseUrl + - torrentId + - torrentSize - match: - torrenturl: "{{ .baseUrl }}/download.php/{{ .torrentId }}/{{ .torrentName }}.torrent?torrent_pass={{ .passkey }}" - encode: - - torrentName + match: + torrenturl: "/download.php/{{ .torrentId }}/{{ .torrentName }}.torrent?torrent_pass={{ .passkey }}" + encode: + - torrentName diff --git a/internal/indexer/definitions/torrentdb.yaml b/internal/indexer/definitions/torrentdb.yaml index 614854a..934e999 100644 --- a/internal/indexer/definitions/torrentdb.yaml +++ b/internal/indexer/definitions/torrentdb.yaml @@ -47,21 +47,21 @@ irc: label: NickServ Password help: NickServ password -parse: - type: single - lines: - - test: - - "New Torrent Announcement: Name:'That Show S01-S06 COMPLETE 1080p BluRay DD5 1 (With Commentary) x265-GROUP' Size:'42.92 GB' Freeleech Uploaded by:'Anonymous Uploader' - https://torrentdb.net/torrent/that-show-s01-s06-complete-1080p-bluray-dd5-1-with-commentary-x265-group" - - "New Torrent Announcement: Name:'Small Game + All DLCs-GROUP2' Size:'2.65 GB' Uploaded by:'uploader1' - https://torrentdb.net/torrent/small-game-all-dlcs-group2" - pattern: "^New Torrent Announcement: <(.*)> Name:'(.*?)' Size:'(.*?)' ?(Freeleech)? Uploaded by:'(.*)' - (https.*)torrent.(.*)$" - vars: - - category - - torrentName - - torrentSize - - freeleech - - uploader - - baseUrl - - torrentId + parse: + type: single + lines: + - test: + - "New Torrent Announcement: Name:'That Show S01-S06 COMPLETE 1080p BluRay DD5 1 (With Commentary) x265-GROUP' Size:'42.92 GB' Freeleech Uploaded by:'Anonymous Uploader' - https://torrentdb.net/torrent/that-show-s01-s06-complete-1080p-bluray-dd5-1-with-commentary-x265-group" + - "New Torrent Announcement: Name:'Small Game + All DLCs-GROUP2' Size:'2.65 GB' Uploaded by:'uploader1' - https://torrentdb.net/torrent/small-game-all-dlcs-group2" + pattern: "^New Torrent Announcement: <(.*)> Name:'(.*?)' Size:'(.*?)' ?(Freeleech)? Uploaded by:'(.*)' - (https.*)torrent.(.*)$" + vars: + - category + - torrentName + - torrentSize + - freeleech + - uploader + - baseUrl + - torrentId - match: - torrenturl: "{{ .baseUrl }}torrent/download/irssi/{{ .torrentId }}/{{ .passkey }}" + match: + torrenturl: "/torrent/download/irssi/{{ .torrentId }}/{{ .passkey }}" diff --git a/internal/indexer/definitions/torrentleech.yaml b/internal/indexer/definitions/torrentleech.yaml index cdd80ba..998a56d 100644 --- a/internal/indexer/definitions/torrentleech.yaml +++ b/internal/indexer/definitions/torrentleech.yaml @@ -5,7 +5,11 @@ identifier: torrentleech description: TorrentLeech (TL) is a private torrent tracker for 0DAY / GENERAL. language: en-us urls: - - https://www.torrentleech.org + - https://www.torrentleech.org/ + - https://www.torrentleech.cc/ + - https://www.torrentleech.me/ + - https://www.tleechreload.org/ + - https://www.tlgetin.cc/ privacy: private protocol: torrent supports: @@ -48,24 +52,22 @@ irc: label: NickServ Password help: NickServ password -parse: - type: single - lines: - - test: - - "New Torrent Announcement: Name:'debian live 10 6 0 amd64 standard iso' uploaded by 'Anonymous' - http://www.tracker01.test/torrent/000000" - - "New Torrent Announcement: Name:'debian live 10 6 0 amd64 standard iso' uploaded by 'Anonymous' freeleech - http://www.tracker01.test/torrent/000000" - pattern: New Torrent Announcement:\s*<([^>]*)>\s*Name:'(.*)' uploaded by '([^']*)'\s*(freeleech)*\s*-\s*(https?\:\/\/[^\/]+\/)torrent\/(\d+) - vars: - - category + parse: + type: single + lines: + - test: + - "New Torrent Announcement: Name:'debian live 10 6 0 amd64 standard iso' uploaded by 'Anonymous' - http://www.tracker01.test/torrent/000000" + - "New Torrent Announcement: Name:'debian live 10 6 0 amd64 standard iso' uploaded by 'Anonymous' freeleech - http://www.tracker01.test/torrent/000000" + pattern: New Torrent Announcement:\s*<([^>]*)>\s*Name:'(.*)' uploaded by '([^']*)'\s*(freeleech)*\s*-\s*(https?\:\/\/[^\/]+\/)torrent\/(\d+) + vars: + - category + - torrentName + - uploader + - freeleech + - baseUrl + - torrentId + + match: + torrenturl: "/rss/download/{{ .torrentId }}/{{ .rsskey }}/{{ .torrentName }}.torrent" + encode: - torrentName - - uploader - - freeleech - - baseUrl - - torrentId - - match: - torrenturl: "{{ .baseUrl }}rss/download/{{ .torrentId }}/{{ .rsskey }}/{{ .torrentName }}.torrent" - encode: - - torrentName - - diff --git a/internal/indexer/definitions/torrentnetwork.yaml b/internal/indexer/definitions/torrentnetwork.yaml index 51ddc06..7d7b853 100644 --- a/internal/indexer/definitions/torrentnetwork.yaml +++ b/internal/indexer/definitions/torrentnetwork.yaml @@ -47,23 +47,23 @@ irc: label: NickServ Password help: NickServ password -parse: - type: multi - lines: - - test: - - "{New Torrent} Name {Luke_EP--Wildstyle_-_Sump_Ting-(RNR002)-WEB-2016-OMA} Typ {Music|MP3} Pre {14 s}" - pattern: '\{New Torrent\} Name \{(.*)\} Typ \{(.+?)\}(?: Pre \{(.*)\})?' - vars: - - torrentName - - category - - preTime - - test: - - "{New Torrent} Size {24.629 MiB} Files {5} Link {https://tntracker.org/torrent/000000}" - pattern: '\{New Torrent\} Size \{(.*)\} Files \{\d+\} Link \{(https?:\/\/[^\/]+)\/torrent\/(\d+)\}' - vars: - - torrentSize - - baseUrl - - torrentId + parse: + type: multi + lines: + - test: + - "{New Torrent} Name {Luke_EP--Wildstyle_-_Sump_Ting-(RNR002)-WEB-2016-OMA} Typ {Music|MP3} Pre {14 s}" + pattern: '\{New Torrent\} Name \{(.*)\} Typ \{(.+?)\}(?: Pre \{(.*)\})?' + vars: + - torrentName + - category + - preTime + - test: + - "{New Torrent} Size {24.629 MiB} Files {5} Link {https://tntracker.org/torrent/000000}" + pattern: '\{New Torrent\} Size \{(.*)\} Files \{\d+\} Link \{(https?:\/\/[^\/]+\/)torrent\/(\d+)\}' + vars: + - torrentSize + - baseUrl + - torrentId - match: - torrenturl: "{{ .baseUrl }}/download/{{ .torrentId }}/{{ .passkey }}" \ No newline at end of file + match: + torrenturl: "/download/{{ .torrentId }}/{{ .passkey }}" diff --git a/internal/indexer/definitions/torrentseeds.yaml b/internal/indexer/definitions/torrentseeds.yaml index d760ee4..21d5bb7 100644 --- a/internal/indexer/definitions/torrentseeds.yaml +++ b/internal/indexer/definitions/torrentseeds.yaml @@ -5,7 +5,7 @@ identifier: torrentseeds description: TorrentSeeds (TS) is a GENERAL/0-DAY tracker with great pretimes. language: en-us urls: - - https://torrentseeds.org + - https://torrentseeds.org/ privacy: private protocol: torrent supports: @@ -54,19 +54,19 @@ irc: label: Invite command help: Invite auth with Cerberus. Replace USERNAME and PID (passkey). -parse: - type: single - lines: - - test: - - "New: This.Is.A.New.show.S00E00.720p.WEB.H264-Test .:. Category: TV/HD .:. Size: 364.82 MB .:. URL: https://www.torrentseeds.org/details.php?id=000000 .:. Uploaded by: George." - pattern: 'New: (.*) \.:\. Category: (.*) \.:\. Size: (.*) \.:\. URL: (https?\:\/\/[^\/]+).*\/(\d{6,9}) \.:\. Uploaded by: (.*)\.' - vars: - - torrentName - - category - - torrentSize - - baseUrl - - torrentId - - uploader + parse: + type: single + lines: + - test: + - "New: This.Is.A.New.show.S00E00.720p.WEB.H264-Test .:. Category: TV/HD .:. Size: 364.82 MB .:. URL: https://www.torrentseeds.org/details.php?id=000000 .:. Uploaded by: George." + pattern: 'New: (.+) \.:\. Category: (.+) \.:\. Size: (.+) \.:\. URL: (https?\:\/\/.+\/).+id=(\d+) \.:\. Uploaded by: (.*)\.' + vars: + - torrentName + - category + - torrentSize + - baseUrl + - torrentId + - uploader - match: - torrenturl: "{{ .baseUrl }}/torrent/download/{{ .torrentId }}.{{ .rsskey }}" + match: + torrenturl: "/torrent/download/{{ .torrentId }}.{{ .rsskey }}" diff --git a/internal/indexer/definitions/torrentsyndikat.yaml b/internal/indexer/definitions/torrentsyndikat.yaml index e9c03f3..982749e 100644 --- a/internal/indexer/definitions/torrentsyndikat.yaml +++ b/internal/indexer/definitions/torrentsyndikat.yaml @@ -54,21 +54,21 @@ irc: label: Invite command help: Invite auth with Synd1c4t3. Replace IRCKEY -parse: - type: single - lines: - - test: - - "NEU Welcome.to.the.N.H.K.S01E15.German.DL.AC3.720p.BluRay.x264-ABJ [Serien/720p] [P2P] [678.68 MB] -- https://torrent-syndikat.org/details.php?id=000000 | Animation, Anime, Comedy, Drama, Romance, Thriller, Encode, AVC, DL, PID:00000, tt0857297" - - "NEU KLIM_Beats-FireFlies-WEB-2016-KNOWN [Audio/Musik/MP3] [O-SCENE] [59.82 MB] -- https://torrent-syndikat.org/details.php?id=000000 | Hip-Hop" - - "NEU DarkSpar-DARKZER0 [Spiele/Windows] [O-SCENE] [54.46 MB] -- https://torrent-syndikat.org/details.php?id=000000 | " - pattern: '^NEU (.*) \[(.*)\] \[(.*)\] \[(.*)\] -- (https?\:\/\/[^\/]+)\/.*\?id=(\d+) \| (.*)' - vars: - - torrentName - - category - - origin - - torrentSize - - baseUrl - - torrentId - - tags - match: - torrenturl: "{{ .baseUrl }}/download.php?id={{ .torrentId }}&apikey={{ .api_key }}" + parse: + type: single + lines: + - test: + - "NEU Welcome.to.the.N.H.K.S01E15.German.DL.AC3.720p.BluRay.x264-ABJ [Serien/720p] [P2P] [678.68 MB] -- https://torrent-syndikat.org/details.php?id=000000 | Animation, Anime, Comedy, Drama, Romance, Thriller, Encode, AVC, DL, PID:00000, tt0857297" + - "NEU KLIM_Beats-FireFlies-WEB-2016-KNOWN [Audio/Musik/MP3] [O-SCENE] [59.82 MB] -- https://torrent-syndikat.org/details.php?id=000000 | Hip-Hop" + - "NEU DarkSpar-DARKZER0 [Spiele/Windows] [O-SCENE] [54.46 MB] -- https://torrent-syndikat.org/details.php?id=000000 | " + pattern: 'NEU (.+) \[(.+)\] \[(.+)\] \[(.+)\] -- (https?\:\/\/.+\/).+id=(\d+) \| (.+)' + vars: + - torrentName + - category + - origin + - torrentSize + - baseUrl + - torrentId + - tags + match: + torrenturl: "/download.php?id={{ .torrentId }}&apikey={{ .api_key }}" diff --git a/internal/indexer/definitions/trancetraffic.yaml b/internal/indexer/definitions/trancetraffic.yaml index ec94910..e1c7037 100644 --- a/internal/indexer/definitions/trancetraffic.yaml +++ b/internal/indexer/definitions/trancetraffic.yaml @@ -47,35 +47,35 @@ irc: label: NickServ Password help: NickServ password -parse: - type: multi - lines: - - test: - - "New Torrent Uploaded:" - pattern: '^New Torrent Uploaded:' - - test: - - "Name....: That Artist - Good Album-SAT-01-30-2021-GROUP" - pattern: '^Name\.*:\s*(.*)' - vars: - - torrentName - - test: - - "Uploader: anon" - pattern: '^Uploader\.*:\s*(.*)' - vars: - - uploader - - test: - - "Category: Livesets - House" - pattern: '^Category\.*:\s*(.*)' - vars: - - category - - test: - - "URL.....: https://www.trancetraffic.com/details.php?id=000000&hit=1" - pattern: '^URL\.*:\s*(https?\:\/\/[^\/]+\/).*[&\?]id=(\d+)' - vars: - - baseUrl - - torrentId + parse: + type: multi + lines: + - test: + - "New Torrent Uploaded:" + pattern: '^New Torrent Uploaded:' + - test: + - "Name....: That Artist - Good Album-SAT-01-30-2021-GROUP" + pattern: '^Name\.*:\s*(.*)' + vars: + - torrentName + - test: + - "Uploader: anon" + pattern: '^Uploader\.*:\s*(.*)' + vars: + - uploader + - test: + - "Category: Livesets - House" + pattern: '^Category\.*:\s*(.*)' + vars: + - category + - test: + - "URL.....: https://www.trancetraffic.com/details.php?id=000000&hit=1" + pattern: '^URL\.*:\s*(https?\:\/\/[^\/]+\/).*[&\?]id=(\d+)' + vars: + - baseUrl + - torrentId - match: - torrenturl: "{{ .baseUrl }}download.php/{{ .torrentId }}/{{ .torrentName }}.torrent?passkey={{ .passkey }}" - encode: - - torrentName + match: + torrenturl: "/download.php/{{ .torrentId }}/{{ .torrentName }}.torrent?passkey={{ .passkey }}" + encode: + - torrentName diff --git a/internal/indexer/definitions/uhdbits.yaml b/internal/indexer/definitions/uhdbits.yaml index 09f1d9b..d953b93 100644 --- a/internal/indexer/definitions/uhdbits.yaml +++ b/internal/indexer/definitions/uhdbits.yaml @@ -61,19 +61,20 @@ irc: label: Invite command help: Invite auth with UHDBot. Replace IRCKEY. -parse: - type: single - lines: - - test: - - "New Torrent: A Movie [2015] - GROUP Type: Movie / 1080p / Encode / Freeleech: 100 Size: 7.00GB - https://uhdbits.org/torrents.php?id=00000 / https://uhdbits.org/torrents.php?action=download&id=00000" - pattern: 'New Torrent: (.*) Type: (.*?) \/ (.*?) Freeleech: (.*) Size: (.*) - https?:\/\/.* \/ (https?:\/\/.*id=\d+)' - vars: - - torrentName - - category - - releaseTags - - freeleechPercent - - torrentSize - - baseUrl + parse: + type: single + lines: + - test: + - "New Torrent: A Movie [2015] - GROUP Type: Movie / 1080p / Encode / Freeleech: 100 Size: 7.00GB - https://uhdbits.org/torrents.php?id=00000 / https://uhdbits.org/torrents.php?action=download&id=00000" + pattern: 'New Torrent: (.+) Type: (.+?) \/ (.*?) Freeleech: (.+) Size: (.+) - https?:\/\/.+ \/ (https?:\/\/.+\/).+id=(\d+)' + vars: + - torrentName + - category + - releaseTags + - freeleechPercent + - torrentSize + - baseUrl + - torrentId - match: - torrenturl: "{{ .baseUrl }}&authkey={{ .authkey }}&torrent_pass={{ .torrent_pass }}" + match: + torrenturl: "/torrents.php?action=download&id={{ .torrentId }}&authkey={{ .authkey }}&torrent_pass={{ .torrent_pass }}" diff --git a/internal/indexer/definitions/xspeeds.yaml b/internal/indexer/definitions/xspeeds.yaml index 5190f51..9ebe185 100644 --- a/internal/indexer/definitions/xspeeds.yaml +++ b/internal/indexer/definitions/xspeeds.yaml @@ -5,7 +5,7 @@ identifier: xspeeds description: XSpeeds (XS) is a private torrent tracker for MOVIES / TV / GENERAL. language: en-us urls: - - https://xspeeds.eu + - https://xspeeds.eu/ privacy: private protocol: torrent supports: @@ -47,61 +47,61 @@ irc: label: NickServ Password help: NickServ password -categories: - - 4K Movies - - 4K TV - - 4K TV Boxsets - - Anime - - Audiobooks - - Blu-Ray - - Books Magazines - - Cams/TS - - Documentaries - - DVDR - - Foreign - - Kids - - Mac Games - - MMA - - Movie Boxsets - - Movies - - Music - - Music Videos - - Nintendo - - Other - - PC Games - - Pictures - - Playstation - - PPV - - Soaps - - Sports / MotorSports - - Sports / Olympics - - Sports / UK Football - - TOTM - - TV Boxsets - - TV Boxsets / HD Boxsets - - TV Boxsets / HEVC Boxsets - - TV-HD - - TV-HD / HEVC - - TV-SD - - Wii Games - - Wrestling - - Xbox Games + categories: + - 4K Movies + - 4K TV + - 4K TV Boxsets + - Anime + - Audiobooks + - Blu-Ray + - Books Magazines + - Cams/TS + - Documentaries + - DVDR + - Foreign + - Kids + - Mac Games + - MMA + - Movie Boxsets + - Movies + - Music + - Music Videos + - Nintendo + - Other + - PC Games + - Pictures + - Playstation + - PPV + - Soaps + - Sports / MotorSports + - Sports / Olympics + - Sports / UK Football + - TOTM + - TV Boxsets + - TV Boxsets / HD Boxsets + - TV Boxsets / HEVC Boxsets + - TV-HD + - TV-HD / HEVC + - TV-SD + - Wii Games + - Wrestling + - Xbox Games -parse: - type: single - lines: - - test: - - "xspeeds.eu - New Torrent: ( The.Best.Show.S03E07.720p.BluRay.x264-GROUP ) Size: ( 1.96 GB ) Category: ( TV-HD ) Uploader: ( uploader1 ) Link: ( https://www.xspeeds.eu/details.php?id=0000000 )" - - "xspeeds.eu - New Torrent: ( Some.Show.S21E06.1080p.HEVC.x265-GROUP1 ) Size: ( 1.04 GB ) Category: ( HEVC ) Uploader: ( uploader2 ) Link: ( https://www.xspeeds.eu/details.php?id=0000000 )" - - "xspeeds.eu - New Torrent: ( Some.Show.S21E06.XviD-GROUP2 ) Size: ( 861.32 MB ) Category: ( TV-SD ) Uploader: ( uploader2 ) Link: ( https://www.xspeeds.eu/details.php?id=0000000 )" - pattern: '\s*xspeeds.eu - New Torrent: \( (.*) \) Size: \( ([^)]*) \)\s*Category: \( ([^)]*) \) Uploader: \( ([^)]*) \) Link: \( (https?\:\/\/[^\/]+)\/.*[&\?]id=(\d+) \)' - vars: - - torrentName - - torrentSize - - category - - uploader - - baseUrl - - torrentId + parse: + type: single + lines: + - test: + - "xspeeds.eu - New Torrent: ( The.Best.Show.S03E07.720p.BluRay.x264-GROUP ) Size: ( 1.96 GB ) Category: ( TV-HD ) Uploader: ( uploader1 ) Link: ( https://www.xspeeds.eu/details.php?id=0000000 )" + - "xspeeds.eu - New Torrent: ( Some.Show.S21E06.1080p.HEVC.x265-GROUP1 ) Size: ( 1.04 GB ) Category: ( HEVC ) Uploader: ( uploader2 ) Link: ( https://www.xspeeds.eu/details.php?id=0000000 )" + - "xspeeds.eu - New Torrent: ( Some.Show.S21E06.XviD-GROUP2 ) Size: ( 861.32 MB ) Category: ( TV-SD ) Uploader: ( uploader2 ) Link: ( https://www.xspeeds.eu/details.php?id=0000000 )" + pattern: '\s*xspeeds.eu - New Torrent: \( (.*) \) Size: \( ([^)]*) \)\s*Category: \( ([^)]*) \) Uploader: \( ([^)]*) \) Link: \( (https?\:\/\/[^\/]+\/).*[&\?]id=(\d+) \)' + vars: + - torrentName + - torrentSize + - category + - uploader + - baseUrl + - torrentId - match: - torrenturl: "{{ .baseUrl }}/download.php?type=rss&secret_key={{ .passkey }}&id={{ .torrentId }}" + match: + torrenturl: "/download.php?type=rss&secret_key={{ .passkey }}&id={{ .torrentId }}" diff --git a/internal/indexer/service.go b/internal/indexer/service.go index 45c7f61..1674989 100644 --- a/internal/indexer/service.go +++ b/internal/indexer/service.go @@ -227,6 +227,7 @@ func (s *service) mapIndexer(indexer domain.Indexer) (*domain.IndexerDefinition, d.Name = indexer.Name d.Identifier = indexer.Identifier d.Implementation = indexer.Implementation + d.BaseURL = indexer.BaseURL d.Enabled = indexer.Enabled if d.SettingsMap == nil { @@ -262,6 +263,7 @@ func (s *service) updateMapIndexer(indexer domain.Indexer) (*domain.IndexerDefin d.Name = indexer.Name d.Identifier = indexer.Identifier d.Implementation = indexer.Implementation + d.BaseURL = indexer.BaseURL d.Enabled = indexer.Enabled if d.SettingsMap == nil { @@ -300,16 +302,14 @@ func (s *service) GetTemplates() ([]domain.IndexerDefinition, error) { func (s *service) Start() error { // load all indexer definitions - err := s.LoadIndexerDefinitions() - if err != nil { + if err := s.LoadIndexerDefinitions(); err != nil { s.log.Error().Err(err).Msg("could not load indexer definitions") return err } if s.config.CustomDefinitions != "" { // load custom indexer definitions - err = s.LoadCustomIndexerDefinitions() - if err != nil { + if err := s.LoadCustomIndexerDefinitions(); err != nil { return errors.Wrap(err, "could not load custom indexer definitions") } } @@ -356,8 +356,6 @@ func (s *service) removeIndexer(indexer domain.Indexer) { // remove mapped definition delete(s.mappedDefinitions, indexer.Identifier) - - return } func (s *service) addIndexer(indexer domain.Indexer) error { @@ -465,16 +463,14 @@ func (s *service) LoadIndexerDefinitions() error { s.log.Trace().Msgf("parsing: %v", file) - var d *domain.IndexerDefinition - data, err := fs.ReadFile(Definitions, file) if err != nil { s.log.Error().Stack().Err(err).Msgf("failed reading file: %v", file) return errors.Wrap(err, "could not read file: %v", file) } - err = yaml.Unmarshal(data, &d) - if err != nil { + var d domain.IndexerDefinition + if err = yaml.Unmarshal(data, &d); err != nil { s.log.Error().Stack().Err(err).Msgf("failed unmarshal file: %v", file) return errors.Wrap(err, "could not unmarshal file: %v", file) } @@ -483,7 +479,7 @@ func (s *service) LoadIndexerDefinitions() error { d.Implementation = "irc" } - s.definitions[d.Identifier] = *d + s.definitions[d.Identifier] = d } s.log.Debug().Msgf("Loaded %d indexer definitions", len(s.definitions)) @@ -524,14 +520,13 @@ func (s *service) LoadCustomIndexerDefinitions() error { s.log.Trace().Msgf("parsing custom: %v", file) - //data, err := fs.ReadFile(Definitions, filePath) data, err := os.ReadFile(file) if err != nil { s.log.Error().Stack().Err(err).Msgf("failed reading file: %v", file) return errors.Wrap(err, "could not read file: %v", file) } - var d *domain.IndexerDefinition + var d *domain.IndexerDefinitionCustom if err = yaml.Unmarshal(data, &d); err != nil { s.log.Error().Stack().Err(err).Msgf("failed unmarshal file: %v", file) return errors.Wrap(err, "could not unmarshal file: %v", file) @@ -546,7 +541,12 @@ func (s *service) LoadCustomIndexerDefinitions() error { d.Implementation = "irc" } - s.definitions[d.Identifier] = *d + // to prevent crashing from non-updated definitions lets skip + if d.Implementation == "irc" && d.IRC.Parse == nil { + s.log.Warn().Msgf("DEPRECATED: indexer definition version: %v", file) + } + + s.definitions[d.Identifier] = *d.ToIndexerDefinition() customCount++ } diff --git a/test/definitions/mock.yaml b/test/definitions/mock.yaml index 1031750..d6cb654 100644 --- a/test/definitions/mock.yaml +++ b/test/definitions/mock.yaml @@ -5,7 +5,7 @@ identifier: mock description: MockIndexer is a mock indexer. language: en-us urls: - - http://localhost.test + - http://localhost.test/ privacy: private protocol: torrent supports: @@ -47,24 +47,22 @@ irc: label: NickServ Password help: NickServ password -parse: - type: single - lines: - - test: - - "New Torrent Announcement: Name:'debian live 10 6 0 amd64 standard iso' uploaded by 'Anonymous' - http://www.localhost.test/torrent/000000" - - "New Torrent Announcement: Name:'debian live 10 6 0 amd64 standard iso' uploaded by 'Anonymous' freeleech - http://www.localhost.test/torrent/000000" - pattern: New Torrent Announcement:\s*<([^>]*)>\s*Name:'(.*)' uploaded by '([^']*)'\s*(freeleech)*\s*-\s*(https?\:\/\/[^\/]+\/)torrent\/(\d+) - vars: - - category + parse: + type: single + lines: + - test: + - "New Torrent Announcement: Name:'debian live 10 6 0 amd64 standard iso' uploaded by 'Anonymous' - http://www.localhost.test/torrent/000000" + - "New Torrent Announcement: Name:'debian live 10 6 0 amd64 standard iso' uploaded by 'Anonymous' freeleech - http://www.localhost.test/torrent/000000" + pattern: New Torrent Announcement:\s*<([^>]*)>\s*Name:'(.*)' uploaded by '([^']*)'\s*(freeleech)*\s*-\s*(https?\:\/\/[^\/]+\/)torrent\/(\d+) + vars: + - category + - torrentName + - uploader + - freeleech + - baseUrl + - torrentId + + match: + torrenturl: "/rss/download/{{ .torrentId }}/{{ .rsskey }}/{{ .torrentName }}.torrent" + encode: - torrentName - - uploader - - freeleech - - baseUrl - - torrentId - - match: - torrenturl: "{{ .baseUrl }}rss/download/{{ .torrentId }}/{{ .rsskey }}/{{ .torrentName }}.torrent" - encode: - - torrentName - - diff --git a/web/src/components/inputs/select_wide.tsx b/web/src/components/inputs/select_wide.tsx new file mode 100644 index 0000000..9a9b07c --- /dev/null +++ b/web/src/components/inputs/select_wide.tsx @@ -0,0 +1,119 @@ +import type { FieldProps } from "formik"; +import { Field } from "formik"; +import { components, ControlProps, InputProps, MenuProps, OptionProps } from "react-select"; +import { OptionBasicTyped } from "../../domain/constants"; +import CreatableSelect from "react-select/creatable"; + +interface SelectFieldProps { + name: string; + label: string; + help?: string; + placeholder?: string; + options: OptionBasicTyped[] +} + +export function SelectFieldCreatable({ name, label, help, placeholder, options }: SelectFieldProps) { + return ( +
+
+ +
+
+ + {({ + field, + form: { setFieldValue } + }: FieldProps) => ( + ({ + ...base, + color: "unset" + }) + }} + theme={(theme) => ({ + ...theme, + spacing: { + ...theme.spacing, + controlHeight: 30, + baseUnit: 2 + } + })} + // value={field?.value ? field.value : options.find(o => o.value == field?.value)} + value={field?.value ? { value: field.value, label: field.value } : field.value} + onChange={(option) => { + if (option === null) { + setFieldValue(field.name, ""); + return; + } else { + setFieldValue(field.name, option.value ?? ""); + } + }} + options={[...[...options, { value: field.value, label: field.value }].reduce((map, obj) => map.set(obj.value, obj), new Map()).values()]} + /> + )} + + {help && ( +

{help}

+ )} +
+
+ ); +} + +const Input = (props: InputProps) => { + return ( + + ); +}; + +const Control = (props: ControlProps) => { + return ( + + ); +}; + +const Menu = (props: MenuProps) => { + return ( + + ); +}; + +const Option = (props: OptionProps) => { + return ( + + ); +}; diff --git a/web/src/forms/settings/IndexerForms.tsx b/web/src/forms/settings/IndexerForms.tsx index 4f5ae0d..6eb8d16 100644 --- a/web/src/forms/settings/IndexerForms.tsx +++ b/web/src/forms/settings/IndexerForms.tsx @@ -15,6 +15,7 @@ import { APIClient } from "../../api/APIClient"; import { PasswordFieldWide, SwitchGroupWide, TextFieldWide } from "../../components/inputs"; import { SlideOver } from "../../components/panels"; import Toast from "../../components/notifications/Toast"; +import { SelectFieldCreatable } from "../../components/inputs/select_wide"; const Input = (props: InputProps) => ( { setFieldValue(`irc.${s.name}`, s.default ?? ""); }); @@ -443,6 +445,15 @@ export function IndexerAddForm({ isOpen, toggle }: AddProps) { + {indexer.implementation == "irc" && ( + ({ value: u, label: u, key: u })) } + /> + )} + {SettingFields(indexer, values.identifier)} @@ -550,6 +561,7 @@ export function IndexerUpdateForm({ isOpen, toggle, indexer }: UpdateProps) { enabled: indexer.enabled, identifier: indexer.identifier, implementation: indexer.implementation, + base_url: indexer.base_url, settings: indexer.settings?.reduce( (o: Record, obj: IndexerSetting) => ({ ...o, @@ -592,6 +604,16 @@ export function IndexerUpdateForm({ isOpen, toggle, indexer }: UpdateProps) { + + {indexer.implementation == "irc" && ( + ({ value: u, label: u, key: u })) } + /> + )} + {renderSettingFields(indexer.settings)} )} diff --git a/web/src/types/Indexer.d.ts b/web/src/types/Indexer.d.ts index b529f94..ed249c0 100644 --- a/web/src/types/Indexer.d.ts +++ b/web/src/types/Indexer.d.ts @@ -4,6 +4,7 @@ interface Indexer { identifier: string; enabled: boolean; implementation: string; + base_url: string; settings: Array; } @@ -12,6 +13,7 @@ interface IndexerDefinition { name: string; identifier: string; implementation: string; + base_url: string; enabled?: boolean; description: string; language: string;