Code Monkey home page Code Monkey logo

get-my-ps5's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

get-my-ps5's Issues

Couple of quick questions.

I saw on twitter that this was potentially not working after a javascript change on Sony's side yesterday, is that still the case?

Is it possible to just have it open the site and get in the queue right away? I don't need it to put it in my cart and check out for me, I just need to get in the damned queue right away. Beyond that I still have to put all my payment info in since I can't find a way of getting that saved ahead of time without buying something (unless I am missing something).

Thanks.

Running into issue trying to run

Platform - Macos Big Sur (11.0.1)
Node Version - 15.4.0
npm version - v7.0.15

Currently I can get past which version i want and if i want an alarm but then when it tries to run it I get this message

Searching for PlayStation 5 disc edition...
/Users/yaboijonno/Desktop/get-my-ps5-master/node_modules/puppeteer/lib/cjs/puppeteer/node/Launcher.js:79
throw new Error(missingText);
^

Error: Could not find browser revision 818858. Run "PUPPETEER_PRODUCT=firefox npm install" or "PUPPETEER_PRODUCT=firefox yarn install" to download a supported Firefox browser binary.
at ChromeLauncher.launch (/Users/yaboijonno/Desktop/get-my-ps5-master/node_modules/puppeteer/lib/cjs/puppeteer/node/Launcher.js:79:23)
at async /Users/yaboijonno/Desktop/get-my-ps5-master/index.js:33:84
npm ERR! code 1
npm ERR! path /Users/yaboijonno/Desktop/get-my-ps5-master
npm ERR! command failed
npm ERR! command sh -c node index

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/yaboijonno/.npm/_logs/2020-12-11T07_22_53_353Z-debug.log
yaboijonno@Jonnos-MacBook-Pro get-my-ps5-master %

Screen Shot 2020-12-10 at 11 24 52 PM

Sony will ban your IP if you run this script for too long

After running it for 12 hours, I now get the follow message from all my devices at home:

Access Denied
You don't have permission to access "http://direct.playstation.com/" on this server.

Reference #18.df467b68.1607800613.812b0a7 

Sound support for Linux

Added sound support for linux distros with the following code change:

function playAlarm() {
    const os = process.platform;

    if (os === "darwin") {
        cmd.runSync("afplay ./alarm.mp3");
    } else if (os === "win32") {
        cmd.runSync("start ./alarm.mp3");
    } else {
        cmd.runSync("mplayer ./alarm.mp3")
    }
}

Obviously requires mplayer installed.

Works as expected. Thank you for this project, works great!

exception not handled in checkForPlayStationRedirect async await

(node:76664) UnhandledPromiseRejectionWarning: Error: connect ETIMEDOUT 69.192.7.202:443
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1129:14)
(node:76664) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
(node:76664) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

I will follow up with a PR later today.

Saying Stock Found When Line Isn't Up

Hello,

I am finding that when I execute the run watch command it is instantly popping up and saying the queue is open, even though it is not. Is there something I'm not doing correctly? I followed the instructions for setting up. and I'm currently running v12.18.1 of node. Attached is a screenshot of what I see happen as soon as I run it, as well as verification of my node version. Please let me know what other details I can provide. Thank you for your efforts!

1607552375595blob

Maybe an issue?

Hi, I do not know anything on this subject. Am I running ok the bot? Do I have some issues? Because it looks weird to me

Last login: Sat Dec 12 18:24:45 on ttys000

The default interactive shell is now zsh.
To update your account to use zsh, please run chsh -s /bin/zsh.
For more details, please visit https://support.apple.com/kb/HT208050.
Justins-MacBook-Pro:get-my-ps5-master-2 justindutari$ npm install
npm WARN deprecated [email protected]: request has been deprecated, see request/request#3142
npm WARN deprecated [email protected]: request-promise-native has been deprecated because it extends the now deprecated request package, see request/request#3142
npm WARN deprecated [email protected]: this library is no longer supported
npm WARN deprecated [email protected]: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated [email protected]: Please see https://github.com/lydell/urix#deprecated

[email protected] install /Users/justindutari/Downloads/get-my-ps5-master-2/node_modules/puppeteer
node install.js

Downloading Chromium r818858 - 132.4 Mb [====================] 100% 0.0s
Chromium (818858) downloaded to /Users/justindutari/Downloads/get-my-ps5-master-2/node_modules/puppeteer/.local-chromium/mac-818858
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN [email protected] No repository field.

added 547 packages from 377 contributors and audited 547 packages in 20.828s

29 packages are looking for funding
run npm fund for details

found 0 vulnerabilities

Justins-MacBook-Pro:get-my-ps5-master-2 justindutari$ npm run watch

[email protected] watch /Users/justindutari/Downloads/get-my-ps5-master-2
node index

Which version would you like? (disc or digital) disc
Would you like to hear a loud, annoying alarm when we find your PS5? (Y or N) Y
Searching for PlayStation 5 disc edition...
No redirect detected. Trying again...
Number of tries 1

No redirect detected. Trying again...
Number of tries 2

No redirect detected. Trying again...
Number of tries 3

No redirect detected. Trying again...
Number of tries 4

No redirect detected. Trying again...
Number of tries 5

url passed to puppeteer browser wrong for digital edition ps5

The url passed to puppeteer if the digital edition ps5 is chosen routes to a 404 Page Not Found playstation page. This might not matter since the goal is to look for "queue-it_log" instead of "softblock" but just wanted to note that the urls between ps5 disc and ps5 digital are different besides just the version ID.

Pupeteer error after updating to 1.1 on OSX

Running on OSX.
Pulled master (currently at 1.1)
Ran NPM install
Ran NPM run watch failed
deleted node modules and re-ran npm install/run watch but got the same error.

Previously worked yesterday before pulling 1.1

Error Message:

[email protected] watch /Users/user/Documents/workspace/get-my-ps5
node index

/Users/User/Documents/workspace/get-my-ps5/node_modules/puppeteer/lib/cjs/puppeteer/common/Page.js:707
catch {
^

SyntaxError: Unexpected token {
at createScript (vm.js:80:10)
at Object.runInThisContext (vm.js:139:10)
at Module._compile (module.js:617:28)
at Object.Module._extensions..js (module.js:664:10)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)
at Function.Module._load (module.js:498:3)
at Module.require (module.js:597:17)
at require (internal/module.js:11:18)
at Object. (/Users/user/Documents/workspace/get-my-ps5/node_modules/puppeteer/lib/cjs/puppeteer/common/Target.js:19:19)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] watch: node index
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] watch script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/user/.npm/_logs/2020-12-11T18_25_36_215Z-debug.log

@camtheperson Please help will donate!!

@camtheperson please help me tried everthing to resolve these errors for hours nothing is working. Please help i will donate!
npm ERR! code ELIFECYCLE
npm ERR! syscall spawn bash
npm ERR! file bash
npm ERR! path bash
npm ERR! errno -4058
npm ERR! [email protected] watch: node ./src/index
npm ERR! spawn bash ENOENT
npm ERR!
npm ERR! Failed at the [email protected] watch script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Drewski\AppData\Roaming\npm-cache_logs\2020-12-13T07_32_19_755Z-debug.log

C:\Users\Drewski\Desktop\get-my-ps5>

After 2632 tries, TimeoutError occured

Windows 10, fresh Node install. Running through Windows Terminal.

Everything runs and the test commands work great, but I left the script running overnight and when I woke up the next morning I found this message.
Screenshot 2020-12-11 140546
There are a few warnings, but most obvious one to me is "TimeoutError: Navigation timeout of 30000 ms exceeded"

I wish I had more insight into what caused this, but it seems like an important issue if this script is going to accomplish what it sets out to do. I'll be leaving it on overnight again and will report back if I can replicate it.

Can't do npm install

I follow the instructions up to typing cmd into the address bar and it opens cmd in the folder, but typing npm install just makes it return 'npm' is not recognized as an internal or external command, operable program or batch file.

Preset configuration option for quick launch?

I'd like to know if there is anything I can do to make it easier/quicker to launch this. Here is my current 5 step process
everytime I launch the bot.

  1. open cmd
  2. navigate to bot folder
  3. npm run watch
  4. select type
  5. select yes to alert

How/would it be possible to setup a script or a shortcut that does those 5 steps automatically when I just click on an icon?

Timing Out, Won't run on its own

Running on Windows 10 from Documents folder. Node was installed into my program files.

I am getting a timeout error that precents the bot from running on its own for long periods of time. Highest number of tries i got was 297. This has been pretty consistent at failing around the 30 try mark. Below is the full dump of error message:

C:\Users\thund\Documents\PS5\get-my-ps5-master\get-my-ps5-master\node_modules\puppeteer\lib\cjs\puppeteer\common\LifecycleWatcher.js:106
return new Promise((fulfill) => (this._maximumTimer = setTimeout(fulfill, this._timeout))).then(() => new Errors_js_1.TimeoutError(errorMessage));
^

TimeoutError: Navigation timeout of 30000 ms exceeded
at C:\Users\thund\Documents\PS5\get-my-ps5-master\get-my-ps5-master\node_modules\puppeteer\lib\cjs\puppeteer\common\LifecycleWatcher.js:106:111
npm ERR! code 1
npm ERR! path C:\Users\thund\Documents\PS5\get-my-ps5-master\get-my-ps5-master
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node index

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\thund\AppData\Local\npm-cache_logs\2020-12-12T17_39_33_233Z-debug.log

Error after running npm run watch

npm ERR! code 1
npm ERR! path /Users/xxx/Downloads/get-my-ps5-master
npm ERR! command failed
npm ERR! command sh -c node index

Steps I fdollowed:

Doanloaded and unzipped
navigated to directory
npm install
npm run watch
type disc
error

Cheers, thanks for the help

Publish to npm

Hey @camtheperson, if we publish to npm we could simplify instructions down to npx get-my-ps5. That'd be cool. What do you think?

Help please - Termux AndroidOS

Screenshot_20201210-015907_Termux
Hey man, so I'm hell bent on getting this to work on my phone. (AndroidOS). I've gotten this far...everything but the last step. I'm using Termux which works pretty well overall, and the Javascript node was not a problem. I even have the zip file downloaded and extracted using a file Mgr. But I'll be honest, my brain is getting fuzzy because this github is knowledge side project in my life (Most important job raising a preschooler, and full time job as Industrial Hygiene Tech and dog mom of 4, and wife, etc). Help, please? It's gonna be a Christmas gift for my son and his dad/my husband. Thanks

@camtheperson

Cannot Run Bot After Successful Launch and Close

Here's one for ya:
I can only run the bot once. If I close it correctly, and then later open a new elevated command prompt, open the working directory, and try to run, it just sits there. Tried npm install - same thing, sites there. Tried npm run watch - just sits there. If I reboot my system, I can run the bot again. Thoughts? Last tested with v1.1.0.

I'm running W10 Pro with an i7 8th gen, 40GB RAM, 1TB M.2 SSD, etc. My a/v software is Emsisoft Anti-Malware, but I've set my working directory as an exclusion

Is this still active and working?

I've had this script running for the past week now, and there have been two different Sony Direct restocks in that time, and this script has not alerted me, put me in queue, etc.

I have been using a vpn the whole time, and changing the IP of it every 12 hours or so, so I know I'm not IP banned.

How do we uninstall this tool?

Thanks for all your help creating this! When you get a chance, can you add a step for uninstall...typical uninstall npm or msiexec /x npm does not work.

Users are directed to the queue regardless of which edition they choose

Currently, the bot directs people to the site as soon as a queue starts forming. However, the queue itself is edition-agnostic, meaning a user running the script could get directed to the site even when their desired edition isn't available.

It would be nice to more effectively detect which edition is actually in stock, and perhaps only send users to the queue if their desired edition is available.

This is kind of a weird problem, because I imagine most people wouldn't mind either edition, period. But I'm not entirely sure how to solve this one at the moment.

Any other thoughts here?

UnhandledPromiseRejectionWarning

I'm getting the following error on win10:

Error log:

C:\Users\username\Documents\GitHub\get-my-ps5>npm run watch

[email protected] watch C:\Users\username\Documents\GitHub\get-my-ps5
node index

Which version would you like? (disc or digital) disc
Would you like to hear a loud, annoying alarm when we find your PS5? (Y or N) Y
Searching for PlayStation 5 disc edition...
(node:31888) UnhandledPromiseRejectionWarning: Error: Could not find browser revision 818858. Run "PUPPETEER_PRODUCT=firefox npm install" or "PUPPETEER_PRODUCT=firefox yarn install" to download a supported Firefox browser binary.
at ChromeLauncher.launch (C:\Users\username\Documents\GitHub\get-my-ps5\node_modules\puppeteer\lib\cjs\puppeteer\node\Launcher.js:79:23)
at async C:\Users\username\Documents\GitHub\get-my-ps5\index.js:33:84
(Use node --trace-warnings ... to show where the warning was created)
(node:31888) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:31888) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

All Script comes up as missing?

Hey all,

Trying to get npm run watch to work but I get kicked an error saying the script is missing. I also tried npm open and npm sound and it gave me the same error.

Steps I take:
run cmd (admin)
npm install
npm run watch (no dice)

node -v v15.10.0
npm -v 7.5.3

I do have a VPN set up and this thing HAS worked for me in the past but I gave up and went on to other things and now im trying to hunt again.

Increase default interval based on new "random position in queue"

We should consider increase the default base interval from 5s to something like 30s to 1m since the new playstation direct queue is putting users in a random position in queue.

This project is still useful because it will open the page when ready, allowing you to not have to worry about checking twitter or where ever else users are checking in stock notifications.

This will help negate being IP banned.

Screen Shot 2020-12-17 at 3 03 11 PM

Edit: my original message and title said "reduce"... totally wrong, it should have been "increase"

false positive

The bot was working perfectly but something change this morning. Every time I start it tells me that it found one and logs me in. But its still out of stock and no que. I think something change on the website.

Some users would like the ability to customize their browser

Ideal implementation:

  • Create an .env-example file
  • Users would copy that file into .env to set it up locally
  • The .env file would include parameters for browser path, and incognito (true/false)
  • Ultimately, we should still give the user the option to test the opening of the browser as well

Some users are directed to the product page instead of the queue

No JavaScript enabled in the response.data

Trying this in ChromeOS (Google Pixelbook) and the reponse.data contains something like this (instead of the page content):

<div class="nojavascript alert alert-error">\n' +
    `        <p>The site requires JavaScript to be enabled! The browser you're using doesn't support JavaScript, or has JavaScript turned off. <br>Try again with a browser that has JavaScript turned on. <a href="https://www.enable-javascript.com/" target="_blank">Learn More</a></p>\n` +
    '    </div>\n' +

node version: v14.15.1
npm version: 6.14.9

Edit: Same on Mac OS Big Sur (11) / node v15.3.0 / npm 7.0.14

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.