A privacy-respecting, ad-free, self-hosted Google metasearch engine with strong security that offers full API support and utilizes Qwant for images, and DuckDuckGo for auto-complete.
Right now, there's a just a tone of inline for loops. This makes it harder to read, as everything's all over the place.
This PR replaces all that with one single for loop for all the results, which appends a dict to the results var. This makes it more readable, since everything's in one place, and doesn't have any hidden inline logic.
This also makes the api self documenting. Before this PR, you have to know the exact index of each item you want to get. Now, you can use a named key to grab the item you want.
This also removes the requests.get in __init__.py that gets localhost.
I would have done it for the text results too, but as you mentioned in #68, you're working on something with that, and interfering with the text results might cause some conflicts.
Right now, there's a just a tone of inline for loops. This makes it harder to read, as everything's all over the place. This PR replaces all that with one single for loop for all the results, which appends a dict to the results var. This makes it more readable, since everything's in one place, and doesn't have any hidden inline logic. This also makes the api self documenting. Before this PR, you have to know the exact index of each item you want to get. Now, you can use a named key to grab the item you want. This also removes the requests.get in
__init__.py
that gets localhost. I would have done it for the text results too, but as you mentioned in #68, you're working on something with that, and interfering with the text results might cause some conflicts.