From 394739d1352527a1de8b21c972b1faeed8e23c9d Mon Sep 17 00:00:00 2001 From: Jeffrey Serio <23226432+hyperreal64@users.noreply.github.com> Date: Sat, 30 Mar 2024 07:58:02 -0500 Subject: [PATCH] Fix goquery code --- kali/main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kali/main.go b/kali/main.go index c47a91d..e282676 100644 --- a/kali/main.go +++ b/kali/main.go @@ -18,7 +18,7 @@ type Kali struct { func (k Kali) AddNewTorrents(transmissionbt *transmissionrpc.Client) error { // Send HTTP GET request and receive response - k.URL = fmt.Sprintf("https://cdimage.kali.org/kali-%s/", k.Relver) + k.URL = fmt.Sprintf("https://cdimage.kali.org/kali-%s", k.Relver) respBody, err := common.GetResponse(k.URL) if err != nil { return err @@ -34,7 +34,7 @@ func (k Kali) AddNewTorrents(transmissionbt *transmissionrpc.Client) error { var torrentURLs []string doc.Find("a").Each(func(i int, s *goquery.Selection) { if strings.Contains(s.Text(), ".torrent") { - torrentURLs = append(torrentURLs, fmt.Sprintf("%s/kali-linux-%s-%s.torrent", k.URL, k.Relver, s.Text())) + torrentURLs = append(torrentURLs, fmt.Sprintf("%s/%s", k.URL, s.Text())) } })