yakuzaemme
Senior Member
- Sep 18, 2016
- 1,005
- 2,930
That's fair enough, maybe just give people a basic idea of how to put one together or what questions to ask a Dev, including what API's to use etc and what you think it would cost for them to buy a bot with similar features.
I think some people are afraid of hiring Devs because they don't know what is involved and don't have an understating of how bots are made or how much they will be charged.
Right. Will do my best.
About the actual bot
General guidelines of how the bot I made is designed, and stuff you (or your developer) may want to take into consideration.
Of course, start off with a timer to read new orders from database (order gets put into database when user makes a purchase)
Start a new thread (multithreaded bot), and begin to process the order.
Initiate your web driver. This is essentially a web browser. Do not use the built in web browser as you may think, it's capabilities is poor,
and not suited for this task. Don't bother with curl and other stuff, it's about to become messy.
I used Selenium Firefox Driver. Navigate to product url, and use the WaitUntil command until "Buy now" button is ready (important! for some reason,
AliExpress is ajax-loading this. Very strange).
Start entering the customers address details. Again, for some reason, AliExpress switched between two different classes, and don't use
name-tags for their inputs. It took me a great while to figure this out, so might save you some time.
Resources: https://i.gyazo.com/9d958330d3b6b78a6a8484e7cb28f167.png
Validate the fields (important). I can post my very very messy code snippet for this, my excuse is that AliExpress backend acts weird with their naming..
https://i.gyazo.com/041796d478d913a9b290b73425025fbb.png
I also add a +.50 cents in case seller changed the price between when bot looked for cheapest one and when placing order. Happened once and
order never went through.
Check if captcha exist. If it does (probably), the workaround is complex.
As their captcha doesn't have a img-tag, you can't save it directly.
My workaround was to screenshot page, and crop the area where element is located.
Snippet (feel free to copy): https://i.gyazo.com/4c0271c62cdae745a99f3ed37a3b398e.png
Then send it to captcha solver service. I used Antigate (cheapest), if they failed, I moved to a while-loop with Anti-Captcha (more expensive) until it was solved.
Add a break of 3 or so tries here so it's not an bugged captcha. If so, call a click on "flush-captcha-image".
From there, all the hard parts are done. Click OK to proceed to payment, populate paypass-field with password and send order. Done!