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

Don't parse dates as prices #4

Open
kmike opened this issue Apr 17, 2019 · 4 comments
Open

Don't parse dates as prices #4

kmike opened this issue Apr 17, 2019 · 4 comments
Labels
help wanted Extra attention is needed

Comments

@kmike
Copy link
Member

kmike commented Apr 17, 2019

Dates like July, 2004 or 15.08.2017 should not be parsed as prices, we should detect them and return amount=None currency=None.

@kmike kmike changed the title Don't parse datse as prices Don't parse dates as prices Apr 17, 2019
@kmike kmike added the help wanted Extra attention is needed label Apr 17, 2019
@GodSaveTheDucks
Copy link

Can we find a universal date parser lib and filter the matches? If that's a good approach I would like to work on it.

@kmike
Copy link
Member Author

kmike commented Oct 11, 2019

@GodSaveTheDucks there is https://github.com/scrapinghub/dateparser, but I think it is better not to follow this approach, for performance and simplicity reasons. It is not a job of price-parser to classify prices vs dates with a highest possible quality; the idea is to have some additional pre-filter, which is fast & reliable, but likely not complete.

@bulatbulat48
Copy link

bulatbulat48 commented Oct 14, 2019

@GodSaveTheDucks there is https://github.com/scrapinghub/dateparser, but I think it is better not to follow this approach, for performance and simplicity reasons. It is not a job of price-parser to classify prices vs dates with a highest possible quality; the idea is to have some additional pre-filter, which is fast & reliable, but likely not complete.

@kmike Code review please: #19
thanks!

@bulatbulat48
Copy link

@kmike tests fixed. Take a look, please.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants