-
Notifications
You must be signed in to change notification settings - Fork 62
fix all the errors #6
base: master
Are you sure you want to change the base?
Conversation
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? |
the target variable will turn into physical edition
I'm interested |
I'm interested |
Ok yall, here's the plan:
I'll be adding PRs for this list and add this list somewhere else lol. And for the meantime, I'll review this PR 😁 |
Where? |
@@ -0,0 +1,183 @@ | |||
import * as puppeteer from 'puppeteer' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How different is this logic from the other target script? If it's mostly the URL, then I feel it's better to include another option in config.json to indicate digital,disc, or both and load the URL based on that. So,
- we can add another prompt asking user to add device type (digital, disc, or both)
- we can set scrape-target-util to accept a type argument, which tells us which URL to go to (digi or disc). If user set as both, then we can run scrape-target-util twice, one with the digi argument, the other with disc. This logic will probably be similar to other sites as well.
Looks like in the readme
… On Nov 17, 2020, at 6:05 PM, stangithuboffical ***@***.***> 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 ***@***.***> 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 ***@***.***> 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:
|
@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 ***@***.***> 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.
|
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 |
Read the README |
basically all the errors are fixed in the pull request that people had