[ 3 / biz / cgl / ck / diy / fa / ic / jp / lit / sci / vr / vt ] [ index / top / reports ] [ become a patron ] [ status ]
2023-11: Warosu is now out of extended maintenance.

/biz/ - Business & Finance


View post   

File: 30 KB, 726x489, wtf.png [View same] [iqdb] [saucenao] [google]
24826135 No.24826135 [Reply] [Original]

>be me
>get idea to make ps5 buying bot for easy 2x
>learn best buy is selling ps5's tomorrow morning
>make a bot in 3-4 hours.
>morning comes
>release at 9am
>4 instances of bot running, refreshing page 4 times a second
>best buy doesn't release shit
>wait 1 hour, bots still running
>still nothing
STILL WAITING, STILL NOTHING WTF?!? HOW DO I PROFIT???

>> No.24826165 [DELETED] 

>>24826135
Make me a bot or a smart contract that (redacted) with the the farming pools.

>> No.24826198

>>24826165
no i don't do that kike ass ponzi scheme shit sorry. all defi is a scam.

>> No.24826203

That bot is way too slow. Find the product ID of the ps5 and then use a http request to add to cart and checkout every second.

>> No.24826208

>>24826135
nigger you know , isDisabled === null and just isDisabled is literally just the same and more legible.

>> No.24826217

>>24826203
how do i get the new cookie each time, I was trying to set that up but i literally need to be on the page to grab the cookie so i was like fk it i'll just use headless chrome.

>> No.24826218

>>24826135
Best buy insider here, I bought them all

>> No.24826225

>>24826135
you'll get stuck with first release PS5s with high price and no one will buy them from you.

>> No.24826229

>>24826208
so isDisabled will return " " if true that's why i'm specifically checking for "null" which would mean it isn't disabled.

>> No.24826296
File: 431 KB, 1200x1200, 132454327785666.jpg [View same] [iqdb] [saucenao] [google]
24826296

>>24826135
best buy ceo here, i bot them all to fuk with u faggot get raped kid

>> No.24826410

>>24826135
I hate when people use recursion for no fucking reason.

>> No.24826657

>>24826410
i have to recursively refresh and check to see if it's disabled, how is that not a reason brainlet?

>> No.24826710

>>24826657
You're just creating stack frames for no reason. It would be more efficient as a while loop.

>> No.24826759
File: 47 KB, 552x571, 1606838350789.png [View same] [iqdb] [saucenao] [google]
24826759

>>24826135
>>24826710
>just learn to code bro

>> No.24826758

>>24826710
oh true, sorry for calling you a brainlet. will take into account for v2

>> No.24827256

>>24826759
It's pretty suprising how few people know the basics of syntax but reading anything past 3 for loops gets increasingly confusing.

>> No.24827287

>>24826135
Got a variable called isDisabled, is not a boolean. Clearly op isDisabled === true. If you code like this clearly you can't code a working bot either, resolve(!!isDisable) instead

>> No.24827315

>>24826198
Underrated comment

>> No.24827861

>>24826759
what the actual fuck dude, aaaaaaaaaAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA IM SEETHING, AI and BIG DATA ARE SO OVERRAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA

>> No.24827884

>>24827287
please forgive me i was being lazy

>> No.24828279

>>24827884
kek, i just actually bothered to look at your code
using both async, recursion, sequential awaits, a single try-catch for 5 throwables, and writing things like
if(!(isDisabled === null))
jesus fucking christ
you mentally fucking damaged code pasting monkey

>> No.24828388

>>24828279

couldn't you just use callbacks in this situation. Are those asyncs even needed?

>> No.24828631

>>24828388
i'm laughing so hard at the code this monkey wrote is so hilarious i cant even begin to describe it
he's declaring a function called checkPage, which awaits another function that returns the awaited result of the promise, to which then he awaits, this kid has got to be like 15 years old or 50

callbacks are generally bad, which are close to what this kids code would look like assuming he knew how to code, if your function only deals with promises, it's cleaner to

new Promise(something).then.then.catch

if you want to use await, just fucking write your promise like a normal fucking human being and await it once you actually need the result, i'm not about to write the actual 5 lines this entire paragraph could be optimized to, but holy shit it's like this kid overcomplicated his code to include 8 different concepts just to brag about how fucking trash it is

>> No.24828713

I though console.log was a meme and not actually used in prod? (not a webdev over here)

>> No.24828823
File: 26 KB, 317x291, 1606137759593.jpg [View same] [iqdb] [saucenao] [google]
24828823

>>24826135
if(!(isDisabled === null))

your code, and javascript, is kinda shit

>> No.24828856

>>24828713
You can use it for a simple app, who cares

>> No.24828921

is there anything companies should do to counter scalpers or is it just a natural part of capitalism?

I guess it doesn’t matter, these issues are always sorted out in a month or two and there’s always issues with new consoles anyway. Still I waste a lot of time thinking about how a perfect world where people who actually genuinely want to enjoy something can buy it at retail price.

>> No.24829065

>>24828713
>>24828856
Yeah its fine, in production youll see fancy logging libraries, but while actually developing, nearly everyone console logs
to understand how retarded this kid is
if(!(isDisabled === null)) not only can be written as if(isDisabled !== null) which is the (not equal) operator this kid probably doesnt know exists, but can also be shortened to if(!isDisabled) which is pretty much the textbook notation of (is not null)

>> No.24829086

>>24828921
it wouldn't be too hard to circumvent scalpers, but retailers genuinely don't give a fuck. theres more demand than supply rn.

>> No.24829149

>>24826203
>>24826217
what language do i use to make a bot like this, python?

>> No.24829212

>>24826135
You should be using puppeteer headless retard and spawn multiple instances

>> No.24829222

>>24829149
Anything goes anon, just pick one and get to it, python or nodejs are the usual picks for these

>> No.24829300

>>24828631
>holy shit it's like this kid overcomplicated his code to include 8 different concepts just to brag about how fucking trash it is
many such cases

>> No.24829340

>>24829212
This guy knows