From a93c5f2c845261d57bdca15e58d68251593d1e65 Mon Sep 17 00:00:00 2001 From: milarin Date: Mon, 16 Jan 2023 00:26:11 +0100 Subject: [PATCH] updated dependencies --- go.mod | 6 +++--- go.sum | 14 ++++++++------ main.go | 5 +++++ nyaa.go | 2 +- 4 files changed, 17 insertions(+), 10 deletions(-) diff --git a/go.mod b/go.mod index 1ca5769..0a28bf2 100644 --- a/go.mod +++ b/go.mod @@ -8,9 +8,9 @@ require ( git.milar.in/milarin/envvars/v2 v2.0.0 git.milar.in/milarin/slices v0.0.6 git.milar.in/milarin/tprint v0.0.7 - git.milar.in/nyaanime/logic v0.0.0-20230115195351-8ed3e407ee72 - git.milar.in/nyaanime/model v0.0.0-20230113095840-5eb2822653c3 - git.milar.in/nyaanime/parsers v0.0.0-20230115135225-d80026a240a2 + git.milar.in/nyaanime/logic v0.0.0-20230115215841-53bbded00fe6 + git.milar.in/nyaanime/model v0.0.0-20230115221845-51c282652aef + git.milar.in/nyaanime/parsers v0.0.0-20230115232356-54a23b868d71 github.com/PuerkitoBio/goquery v1.8.0 github.com/fatih/color v1.13.0 github.com/go-telegram-bot-api/telegram-bot-api v4.6.4+incompatible diff --git a/go.sum b/go.sum index 8271249..bd6616c 100644 --- a/go.sum +++ b/go.sum @@ -12,12 +12,14 @@ git.milar.in/milarin/slices v0.0.6 h1:AQoSarZ58WHYol9c6woWJSe8wFpPC2RC4cvIlZpfg9 git.milar.in/milarin/slices v0.0.6/go.mod h1:NOr53AOeur/qscu/FBj3lsFR262PNYBccLYSTCAXRk4= git.milar.in/milarin/tprint v0.0.7 h1:dvm4l4BhXOie4vtnRMZii0WTLTz2wju8wyUPB/lNeVo= git.milar.in/milarin/tprint v0.0.7/go.mod h1:UwW/B+0cTCbN5hi0bQBE9rIRgLkq+x4V751rrS2KVoI= -git.milar.in/nyaanime/logic v0.0.0-20230115195351-8ed3e407ee72 h1:/kSY7P/NNaUmkxCJMKmB5YbhIA9owX9pErPxREuBAog= -git.milar.in/nyaanime/logic v0.0.0-20230115195351-8ed3e407ee72/go.mod h1:cLuIBDTtpXdzprOIsz73r6ZCE5s0k+o6HA7fH9OuW/M= -git.milar.in/nyaanime/model v0.0.0-20230113095840-5eb2822653c3 h1:mXcEA47FQQzeSDXE3UvhNfIt4fBfpDSq1/f0r+jbHpY= -git.milar.in/nyaanime/model v0.0.0-20230113095840-5eb2822653c3/go.mod h1:kPWLDvFrhc1Uf77gxsBOxNeJ5JTVF2HhVs1IdVcw0tg= -git.milar.in/nyaanime/parsers v0.0.0-20230115135225-d80026a240a2 h1:Q95JBR9mXENAjRhvzPAsFjPfxY0ljUiLVlhfAO4q6UY= -git.milar.in/nyaanime/parsers v0.0.0-20230115135225-d80026a240a2/go.mod h1:GG4vtUIfxopZc/+Y8OAa//vWJw/m6aeoGN7fw6SLiEM= +git.milar.in/nyaanime/logic v0.0.0-20230115215841-53bbded00fe6 h1:6GmcKt0TaHxATGbSpTgDExdRHiON5OwZlHVJCYU0gbA= +git.milar.in/nyaanime/logic v0.0.0-20230115215841-53bbded00fe6/go.mod h1:cLuIBDTtpXdzprOIsz73r6ZCE5s0k+o6HA7fH9OuW/M= +git.milar.in/nyaanime/model v0.0.0-20230115221845-51c282652aef h1:Bp1cMHgGnz5SAVWSL1hk1w7F75LGAkfwHqoTZnNQNbY= +git.milar.in/nyaanime/model v0.0.0-20230115221845-51c282652aef/go.mod h1:kPWLDvFrhc1Uf77gxsBOxNeJ5JTVF2HhVs1IdVcw0tg= +git.milar.in/nyaanime/parsers v0.0.0-20230115231942-89b759a7829f h1:xJiFxbLRKyb+43Yfv3UaZO1GiRGAsakebz6mHKUaRdI= +git.milar.in/nyaanime/parsers v0.0.0-20230115231942-89b759a7829f/go.mod h1:fqiJqSWxh1YVJkKhvQql/21HmQzv4elhC3SpH/2TybI= +git.milar.in/nyaanime/parsers v0.0.0-20230115232356-54a23b868d71 h1:BwWlk7UuQ/Ii97/XUVijujH4nkYJwZ0dHpghQ04hQeo= +git.milar.in/nyaanime/parsers v0.0.0-20230115232356-54a23b868d71/go.mod h1:fqiJqSWxh1YVJkKhvQql/21HmQzv4elhC3SpH/2TybI= github.com/PuerkitoBio/goquery v1.8.0 h1:PJTF7AmFCFKk1N6V6jmKfrNH9tV5pNE6lZMkG0gta/U= github.com/PuerkitoBio/goquery v1.8.0/go.mod h1:ypIiRMtY7COPGk+I/YbZLbxsxn9g5ejnI2HSMtkjZvI= github.com/andybalholm/cascadia v1.3.1 h1:nhxRkql1kdYCc8Snf7D5/D3spOX+dBgjA6u8x004T2c= diff --git a/main.go b/main.go index d2af85d..0fa79f7 100644 --- a/main.go +++ b/main.go @@ -8,6 +8,11 @@ import ( ) func main() { + // check for ffmpeg in PATH + if _, err := exec.LookPath("ffmpeg"); err != nil { + panic(err) // TODO error handling + } + // check for ffprobe in PATH if _, err := exec.LookPath("ffprobe"); err != nil { panic(err) // TODO error handling diff --git a/nyaa.go b/nyaa.go index 5b02737..587bb9c 100644 --- a/nyaa.go +++ b/nyaa.go @@ -15,7 +15,7 @@ import ( var torrentLinkRegex = regexp.MustCompile(`https:\/\/nyaa\.si\/download\/(\d+?)\.torrent`) func GetTorrents() ([]model.Torrent, error) { - resp, err := http.Get("https://nyaa.si/?page=rss") // &f=0&c=0_0&q=Erai-Raws+ayumu" + resp, err := http.Get("https://nyaa.si/?page=rss") if err != nil { return nil, ErrTorrentNotObtainable.Wrap(err, "torrent data acqusition failed") }