Skip to content
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

Add include/exclude regex pattern to filter search result #24

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

elbowz
Copy link

@elbowz elbowz commented Mar 7, 2023

The include/exclude filter are applied on item title, and saved in the json.

I'm not very happy of my solution. I'm spoking about print_sitrep() and print_queries() nested loop.
Honestly, I'm lost inside the multiple loops for, and I don't well figure out the logic behind the json structure, expecially the position of minPrice and maxPrice.

{minPrice: {maxPrice: {...

For sure I have missed something in the program logic and structure...but my PR seems works.

About the minPrice and maxPrice, I see that subito.it have GET params (ps=30&pe=100), but can be used only inside a category, I guess.

I have also added a simple requirements.txt.

Thanks for your time and project!

note: you can do what ever you want with this PR...I have try to leave as much possible unchanged your code, but IMHO a different JSON structure and/or removing the [min,max]Price could be a way.

elbowz added 2 commits March 7, 2023 11:38
Now you can simply do "pip install -r requirements.txt"
Allow to filter search result by title
@morrolinux
Copy link
Owner

looking for testers

@elbowz
Copy link
Author

elbowz commented Mar 12, 2023

You can trash my PR, it will not be a problem for me...

But I'm curious about the JSON structure. Why have you nested the minPrice and maxPrice?

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.

2 participants