这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@jazzzooo
Copy link
Contributor

What does this PR do?

Fixes the brave news engine by fixing an edge-case of js_variable_to_python.

Why is this change important?

This was not a hard fix, but I have some concerns about the recently added js_variable_to_python that replaces chompjs. I'm worried about performance, and that it's likely it will break again. In this case it broke because in js you can write the float 0.314 as .314, saving some bytes. Anyways, the js_variable_to_python discussion is off-topic so I will post about it in Discussions.

How to test this PR locally?

!brnews test

Related issues

Closes #2782

@jazzzooo
Copy link
Contributor Author

jazzzooo commented Sep 15, 2023

oh I noticed the same fix applies to brave.videos, added that too :)
Test with !brvid hello world, before it would crash due to having no thumbnail.

Copy link
Member

@return42 return42 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @jazzzooo, thanks a lot for your spontaneous analysis 🚀

Anyways, the js_variable_to_python discussion is off-topic so I will post about it in Discussions.

Sadly I haven't had the time for a deep comparison of chompjs vs js_variable_to_python .. I would be very happy if you start a discussion about this, so that we have an eye on the subject. 👍

@return42 return42 merged commit ec540a9 into searxng:master Sep 15, 2023
@jazzzooo jazzzooo deleted the brave-news branch September 15, 2023 20:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: brave.news engine

2 participants