-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Fix update engine traits (brave & annas archive) #2853
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Anna’s Archive has cleaned up their languages, available file extensions and changed the HTML form. Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Brave has changed it settings menu fundamental. Region codes are no longer in the HTML page, we have to read the regional codes from a JS: https://cdn.search.brave.com/serp/v2/_app/immutable/chunks/parameters.734c106a.js Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Update searx.data - update_engine_traits.py Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
| # search regions of brave | ||
|
|
||
| engine_traits.all_locale = 'all' | ||
| resp = get('https://cdn.search.brave.com/serp/v2/_app/immutable/chunks/parameters.734c106a.js', headers=headers) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could probably break really quick again, but I don't have a better idea unfortunately
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I have checked: the URL is not a href in a <link> of the root html from https://search.brave.com/settings .. this doc loads some JS and one of the loaded JS scripts extends the <link> list in the root document to load the parameters.734c106a.js' .. very complicated. Instead of having two hard to track indirectness I decided to read directly from parameters.734c106a.js .. and see when it breaks :o
|
@dalf on my local instance If it is to complicated, can we merge and test in SearXNG's master? |
|
You need to add a temporary commit to remove this line: Since there is no way to debug the GitHub actions, prepare yourself to
It will create PR in searxng/searxng : if there are broken, it will be a mess. It is better to test in a fork. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It runs fine in your fork.
Once it runs fine in your fork, I let you remove the WIP commit and self merge.
2e34a3c to
3c3ce81
Compare
Yeah, that did the trick .. PR was created in my clone: return42#254
But I also observed, what I have also seen local on my desktop, 502 Bad Gateway from zlibrary-global.se: Seems to me zlibrary-global.se is sometimes unstable .. since this issue is not related to this PR, I'm going to merge this PR. |
What does this PR do?
fix the fetch traits function of:
Why is this change important?
As @dalf pointed out, the gh workflow to fetch the traits from the engines did fails since month --> #2826 (comment)
How to test this PR locally?
Related issues