parsers/parsers.go

32 lines
666 B
Go
Raw Normal View History

2022-08-04 00:05:19 +02:00
package parsers
import "git.milar.in/animan/model"
/*
how to get all torrent names on a nyaa page:
let s = "";
document.querySelectorAll("tr > td:nth-child(2) > a:not(.comments)").forEach((element, index) => {
s += element.textContent + "\n";
})
console.log(s);
*/
var Parsers = []model.Parser{
{
Identity: "Erai-Raws",
2022-08-04 18:13:41 +02:00
TorrentParser: regexTorrentParser(
`^\[Erai-raws\] (.*) - (.*?) \[(.*?)p\](?:\[HEVC\])?(?:\[Multiple Subtitle\])? (\[.*?\]+)?$`,
TorrentParseOptions{
Name: 1,
Episode: 2,
Resolution: 3,
Languages: 4,
LanguageParser: SquareBracketsLanguageParser,
},
2022-08-04 00:05:19 +02:00
),
FileParser: nil,
},
}