-
Notifications
You must be signed in to change notification settings - Fork 2.3k
[feat] engine: support source filter for ChinaSo news #4693
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
800c8fe to
c9546d8
Compare
* filtering ChinaSo-News results by source, option ``chinaso_news_source`` * add ChinaSo engine to the online docs https://docs.searxng.org/dev/engines/online/chinaso.html * fix SearXNG categories in the settings.yml * deactivate ChinaSo engines ``inactive: true`` until [1] is fixed * configure network of the ChinaSo engines [1] searxng#4694 Signed-off-by: @BrandonStudio Co-authored-by: Markus Heiser <markus.heiser@darmarit.de>
return42
left a comment
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.
I'm a new contributor, please kindly point out any issue I might have brought in.
very good work 👍 .. I tried to improve the ChinaSo engines a little, see diff for the details / mainly:
- add ChinaSo engine to the online docs
- fix SearXNG categories in the settings.yml
- deactivate ChinaSo engines
inactive: trueuntil #4694 is fixed - configure network of the ChinaSo engines
Further I recommend to have a look at our Development Quickstart guide .. make format.python will format your code and make test helps to find issues before commit.
@BrandonStudio can you please verify my modifications do work for you / if so, I think we can merge this PR.
|
Clould you please wait a while?🙏🏻 |
Just of curiousity, what do these two lines do? https://github.com/searxng/searxng/compare/bacf5228dc019dec66e740c3a639410b56841a4c..4e51863a16562a0465382a13324a0eb5c3de16d0#diff-d0b48c4954b3d6f3c85f76f5ac246d6d7b699e7876a27ad7ce66ad282b077034R151-R152
Sure. I will run format check before commit next time (if there is).
It looks good to me, please merge it ❤ |
In the python ecosystem, the standard (plain text) markup is reStructuredText (reST) [PEP-287]. The first line is an anchor in the reST markup and the empty line indicates the end of a directive in the reST markup (in this case the directive is the anchor). We refer to the searxng/searx/engines/chinaso.py Lines 25 to 26 in d47cf9d
You can see the result in the online docs .. click to follow the link under the word "network". The reST markup is much more expressive than you may know from Markdown and other plain-text markups .. but to make it easy for all developers to get started, we have written a reST primer. Related: searxng/searxng-docker#417 (comment) |
What does this PR do?
This PR introduces a new
chinaso_news_sourceconfig for the ChinaSo engine, allowing filtering news results by source (CENTRAL,LOCAL,BUSINESS,EPAPER, orall)Why is this change important?
How to test this PR locally?
Author's checklist
I'm a new contributor, please kindly point out any issue I might have brought in.
Related issues
None