fairgame icon indicating copy to clipboard operation
fairgame copied to clipboard

Check for bugged items in checkout, then remove them from the ASIN list

Open tionw opened this issue 3 years ago • 7 comments

  • check for bugged items in checkout. bugged items will require adding an address at checkout page rather than "place your order". this just checks if there is more than 1 button click needed at checkout page, and if so, it is probably bugged.

  • reduce timeout to wait for content page for bugged items to speed up check process

  • we probably don't want the bot caught stuck on one of these bugged items, and not be able to check other items in the process, so I was thinking to remove the bugged item outright. A different implementation may be better though..

tionw avatar Feb 27 '21 20:02 tionw

not sure why its failing the check in that commit, i just removed an extra line i added earlier.

if yall think its better to just let the bot run and try to checkout the bugged items on repeat i can just close this PR

tionw avatar Feb 27 '21 20:02 tionw

Any idea if it’s possible to have a bugged seller rather than a bugged product? If that Asin were offered by another seller could it potentially pass through checkout just fine?

jersmo avatar Mar 01 '21 09:03 jersmo

Nice work it does bypass ship to address bug, but bugged items making this bot start over from the beginning instead of resuming to the end of the list.

polow avatar Mar 01 '21 11:03 polow

The existing code is a little hard to track. Might I suggest storing a data structure of ASIN to last known bugged time, then only checking it past a 30 minute timeout window?

gtrak avatar Mar 01 '21 14:03 gtrak

If you want to write it lol, sure

DakkJaniels avatar Mar 01 '21 14:03 DakkJaniels

Not sure yet if I want to write it, but if you see a PR, you will know I did :D

gtrak avatar Mar 01 '21 14:03 gtrak

Rather than add to the do_button_click method, couldn't we accomplish the same thing by just moving the increment to the checkout_retry counter at the start of each call to handle_cart? Probably should do the same for the PYO counter too. Right now it only counts up if there is a failure, but I think it makes more sense to just count how many times we hit the method while it tries to checkout. Then we don't need to add special code to the button click method just for checkout, and you can move the prune code to the existing comparison check at line ~274.

Also, pruning out the items automatically should be optional (someone might want it to keep hitting the items no matter what). Can you add a flag for this in cli? --prune-bugged-items ?

Thanks for the feedback. That's probably a good idea, I'll work on it - might take me a couple days as I'm busy this week.

gtrak thats what I was thinking we could do too, since we might want to check again after a timeout. will try that out too

tionw avatar Mar 01 '21 15:03 tionw