Closed haideralipunjabi closed 4 years ago
Hey @haideralipunjabi Thanks for the PR.
I think expecting the URL from the user would not be a good practice since we can already decide that based on the search engine passed by the user.
I would say we should keep the searchEngine
value to a string where the user can pass the name of the search engine and we can keep a fallback/default in case the passed engine is not recognized. That would be better since all the user would have to do is pass the name of the engine.
We can hardcode the query URL's for each engine and decide which to use while parsing the data.
OK. That is a good idea. I will submit an updated PR soon.
The search engine can be customized from
config.json
now.JSON doesn't support comments or I would have commented the config of some other search engines.