cleaner tag parameters

This commit is contained in:
orangix
2023-08-17 12:38:37 +02:00
parent 5c3289d5db
commit 33f306472f
2 changed files with 7 additions and 6 deletions

View File

@@ -69,10 +69,7 @@ func (client *Client) FetchTag(tag string, sort string, page string) (Tag, error
func(key, value gjson.Result) bool {
url, _ := url.Parse(strings.ReplaceAll(value.Get("url").String(), "https://imgur.com", ""))
q := url.Query()
q.Add("tag", tag)
q.Add("sort", sort)
q.Add("page", page)
q.Add("i", key.String())
q.Add("tag", tag+"."+sort+"."+page+"."+key.String())
url.RawQuery = q.Encode()
posts = append(posts, Submission{