Skip to content

Commit dfcfd8e

Browse files
authored
Fix allrecipes and simplyrecipes (#485)
1 parent 01877e5 commit dfcfd8e

File tree

4 files changed

+256
-230
lines changed

4 files changed

+256
-230
lines changed

internal/services/http.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -41,19 +41,19 @@ func (h HTTP) PrepareRequestForURL(url string) (*http.Request, error) {
4141
return nil, err
4242
}
4343

44-
const mozilla = "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:122.0) Gecko/20100101 Firefox/122.0"
44+
const mozilla = "Mozilla/5.0 (X11; Linux x86_64; rv:134.0) Gecko/20100101 Firefox/134.0"
4545

4646
host := h.GetHost(url)
4747
switch host {
48-
case "aberlehome", "bettybossi", "colruyt", "dinnerthendessert", "downshiftology", "findingtimeforcooking", "jumbo",
48+
case "aberlehome", "allrecipes", "bettybossi", "colruyt", "dinnerthendessert", "downshiftology", "findingtimeforcooking", "jumbo",
4949
"marmiton", "natashaskitchen", "parsleyandparm", "puurgezond", "reddit", "robinasbell", "sarahsveganguide",
5050
"thekitchn", "thepalatablelife", "wellplated":
5151
req.Header.Set("User-Agent", mozilla)
5252
case "ah":
5353
req.Header.Set("Accept-Language", "q=1.0,nl-NL,nl;en-US,en;q=0.8,fr-FR;q=0.5,fr;q=0.3")
5454
req.Header.Set("User-Agent", mozilla)
55-
case "chatelaine", "damndelicious":
56-
req.Header.Set("User-Agent", "curl/7.68.0")
55+
case "chatelaine", "damndelicious", "simplyrecipes":
56+
req.Header.Set("User-Agent", "curl/8.11.0")
5757
req.Header.Set("Pragma", "no-cache")
5858
req.Header.Set("DNT", "1")
5959
req.Header.Set("Accept-Encoding", "gzip, deflate, br")

0 commit comments

Comments
 (0)