feat: add proxy layer option for requests

Fixes #56 #21
This commit is contained in:
rramiachraf 2024-05-03 12:45:58 +01:00
parent c940b4a2cd
commit 2c0f43b8f7
15 changed files with 78 additions and 450 deletions

View file

@ -6,6 +6,7 @@ import (
"strings"
"github.com/PuerkitoBio/goquery"
"github.com/rramiachraf/dumb/utils"
)
type Song struct {
@ -73,7 +74,7 @@ func (s *Song) parseSongData(doc *goquery.Document) error {
u := fmt.Sprintf("https://genius.com/api/songs/%s?text_format=plain", songID)
res, err := sendRequest(u)
res, err := utils.SendRequest(u)
if err != nil {
return err
}