PS5bot
PS5bot copied to clipboard
fix all the errors
basically all the errors are fixed in the pull request that people had
Thanks for these changes! I really appreciate it. There's something I want to mention though.The whole concept behind PS5Bot is to keep auto reloading different sites for PS5, but after some thought, this concept is very flawed. Maybe this could be helpful in launch day, but I feel a program that checks for stock availability is more useful since then it'll be much less memory-intensive and easier to add more sites to listen to. Basically like this: https://github.com/jef/streetmerchant. For this reason, I'm tempted to archive this project. But from the looks of it, there has been a decent amount of interest over this. So if you and others are interested in collaborating on a different version that would be awesome. Any thoughts?
Thanks for these changes! I really appreciate it. There's something I want to mention though.The whole concept behind PS5Bot is to keep auto reloading different sites for PS5, but after some thought, this concept is very flawed. Maybe this could be helpful in launch day, but I feel a program that checks for stock availability is more useful since then it'll be much less memory-intensive and easier to add more sites to listen to. Basically like this: https://github.com/jef/streetmerchant. For this reason, I'm tempted to archive this project. But from the looks of it, there has been a decent amount of interest over this. So if you and others are interested in collaborating on a different version that would be awesome. Any thoughts?
I'm interested
I'm interested
Ok yall, here's the plan:
- [ ] address existing Issues
- [ ] can't call ps5bot. I believe it's addressed in this PR
- [ ] add login for other sites besides Target
- [ ] while checking stock availability, keep puppeteer in headless mode. This means running the browser without displaying the UI.
- [ ] If a site is out-of-stock, display 'sitename OUT OF STOCK' in the CLI. Else if in-stock, display 'sitename IN STOCK!', instantiate a browser (not in headless mode) and run the existing scripts to automate purchase
- [ ] Support more sites
- [ ] Option to choose between Disc/Digital version or both
I'll be adding PRs for this list and add this list somewhere else lol. And for the meantime, I'll review this PR 😁
Uh, you know your username and password are displayed in the code, right?
Where?
Looks like in the readme
On Nov 17, 2020, at 6:05 PM, stangithuboffical [email protected] wrote:
Uh, you know your username and password are displayed in the code, right?
Where?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.
Would it be possible if the process is successful and a ps5 is ordered then the procedure is stopped? While I see benefit in successfully ordering more than one, I’d prefer not to.
On Nov 17, 2020, at 6:00 PM, Egan Gumiwang Pratama Bisma [email protected] wrote:
Ok yall, here's the plan:
address existing Issues can't call ps5bot. I believe it's addressed in this PR add login for other sites besides Target while checking stock availability, keep puppeteer in headless mode. This means running the browser without displaying the UI. If a site is out-of-stock, display 'sitename OUT OF STOCK' in the CLI. Else if in-stock, display 'sitename IN STOCK!', instantiate a browser (not in headless mode) and run the existing scripts to automate purchase Support more sites Option to choose between Disc/Digital version or both I'll be adding PRs for this list and add this list somewhere else lol. And for the meantime, I'll review this PR 😁
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.
Good point. I'm leaning towards enforcing one order only. If there's one item in-stock, then stop the listeners while proceeding with the purchase on that one site, regardless whether it'll succeed or not. If that site fails, then users are expected to manually rerun the script. I think that's pretty fair.
I’m not a fan of that approach. I fully intend to leave the script running until a successful purchase is made. But only after a order confirmation is obtained would I want to shut down. I’m not planning on sitting in front of the bot 24/7 until successful. I could be asleep, or at work, or doing things around the house when it goes through.
On Nov 17, 2020, at 6:45 PM, Egan Gumiwang Pratama Bisma [email protected] wrote:
Good point. I'm leaning towards enforcing one order only. If there's one item in-stock, then stop the listeners while proceeding with the purchase on that one site, regardless whether it'll succeed or not. If that site fails, then users are expected to manually rerun the script. I think that's pretty fair.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.
These are all the things I'm planning:
- [ ] Use a request module with cheerio to scrape the website
- [ ] If on stock, switch to puppeteer chromium which will buy it
- [ ] Add login to Playstation Direct
- [ ] Make target utility accept a type argument
@mc130h That's fair. Although keep in mind that some sites like Walmart request for Captcha at random times, at least based on my experience, which is why the current code stops before the last purchase order button. Another reason is, I never tried testing the very last order button since I didn't want to actually order the item I was testing on. I'm open to any suggestions on how to handle this type of situation.
@stangithuboffical Last time I checked, cheerio isn't capable of scraping sites with react/angular/etc but I might be wrong. But the rest of the plan sounds good 🙂
I am running a single Target scrape, and I keep getting the error: Error code: Out of Memory after about 10 minutes of running. 1. Is there any way to prevent this from happening? 2. If there's not a way to prevent it, where do I have to adjust the source to make it reload the page when that happens? In the command prompt, I get "TimeoutError: Navigation timeout of 30000 ms exceeded", so I am thinking instead of displaying this message, just attempt to refresh the page again.
@dsalaz04 A way to prevent it is to run the browser in headless mode while checking for stock (refer to my above comment). Note that this is still in progress. There are rumors that PS5 will be in-stock in a bunch of site before black friday. It's probably not a good idea to use this for that. Basically the aim is to finalize all this by before BF. Hope you understand
Walmart’s site confirms a 3pm ET limited stock release online tomorrow. Was hoping to utilize this bot to grab one, but sill try my luck manually. Wish you all luck.
On Nov 18, 2020, at 6:23 PM, Egan Gumiwang Pratama Bisma [email protected] wrote:
@dsalaz04 A way to prevent it is to run the browser in headless mode while checking for stock (refer to my above comment). Note that this is still in progress. There are rumors that PS5 will be in-stock in a bunch of site before black friday. It's probably not a good idea to use this for that. Basically the aim is to finalize all this by before BF. Hope you understand
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.
@dsalaz04 A way to prevent it is to run the browser in headless mode while checking for stock (refer to my above comment). Note that this is still in progress. There are rumors that PS5 will be in-stock in a bunch of site before black friday. It's probably not a good idea to use this for that. Basically the aim is to finalize all this by before BF. Hope you understand
Tried to run headless and it did the same thing. No problem, just pointing it out so the fixes can take that into consideration.
I might rewrite the whole thing into nodejs because I know like 15% of typescript
How it wark
How it wark
Read the README