jim256 / ebay

0 stars 0 forks source link

Price: digits after decimal place being moved to before decimal place #22

Closed jim256 closed 4 years ago

jim256 commented 4 years ago

I'm seeing a value of 969990 for price for ebay.com/itm/133237328073, and similarly for others.

I think this asks the question of what to do with the cents portion of the price. Could we just round to the nearest dollar? Do you see any danger in doing this with where we nullify date_analyzed when a price drops? Or is it nothing to worry about?

james-carpenter commented 4 years ago

It can be rounded. The best place to handle consistently is in the _ensure_numeric function. I'll push a fix that will handle ints, floats, and numeric values embedded in other strings of text when the field is intended to be an int in MySQL.

james-carpenter commented 4 years ago

Fix has been pushed in commit d0bb0643f13ce282ff03d7e6bc9ae63ec2db7beb