Error(allrecipes): 401 Client Error: Unauthorized
When I use: woob recipes (with allrecipes backend) I get:
Welcome to recipes v3.0 ... Loaded backends: allrecipes
recipes> search tofu Error(allrecipes): 401 Client Error: Unauthorized
I was hoping that I could help solve the problem but I was unable to find the code piece in woob.
I noticed in weboob:
class AllrecipesBrowser(PagesBrowser):
BASEURL = 'https://apps.allrecipes.com'
results = URL('/v1/recipes\?(?P<query>.*)', ResultsPage)
recipe = URL('/v1/recipes/(?P<_id>.*)/', RecipePage)
home = URL('http://allrecipes.com', HomePage)
A URL call with: https://apps.allrecipes.com/v1/recipes/?IngIncl=tofu&IngIncl=mango {"message":"Authorization has been denied for this request."}
I believe that correct URLs should be:
BASEURL = 'https://allrecipes.com'
results = URL('/search/results\?(?P<query>.*)', ResultsPage)
recipe = URL('/search/results/(?P<_id>.*)/', RecipePage)
home = URL('http://allrecipes.com', HomePage)
print("recipe URL:" + recipe)
A call with: https://www.allrecipes.com/search/results/?IngIncl=tofu&IngIncl=mango ...a page of results...
Again I'm sorry that I wasn't able to fix the base code. Pete