mirror of
https://github.com/searxng/searxng.git
synced 2025-05-23 17:02:57 -04:00
[fix] pinterest: engine broken due to API changes (#4816)
- apparently the API now requires a `X-Pinterest-PWS-Handler` in order to properly function (extracted from their web UI) - the other `X-Pinterest` headers here are added in case they become mandatory too Closes: https://github.com/searxng/searxng/issues/4812
This commit is contained in:
parent
88973f5431
commit
502017b901
@ -1,6 +1,5 @@
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
"""Pinterest (images)
|
||||
"""
|
||||
"""Pinterest (images)"""
|
||||
|
||||
from json import dumps
|
||||
|
||||
@ -28,6 +27,11 @@ def request(query, params):
|
||||
'context': {},
|
||||
}
|
||||
params['url'] = f"{base_url}/resource/BaseSearchResource/get/?data={dumps(args)}"
|
||||
params['headers'] = {
|
||||
'X-Pinterest-AppState': 'active',
|
||||
'X-Pinterest-Source-Url': '/ideas/',
|
||||
'X-Pinterest-PWS-Handler': 'www/ideas.js',
|
||||
}
|
||||
|
||||
return params
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user