PS574LK3R (aka. online marketplace item in-stock notification sniper)
PS574LK3R (aka. PS Stocker/Stalker) is an Apple iOS Shortcut-based script that can be configured to automatically send the user a message when a hot, hard-to-find item is back in stock at an online retailer. It was initially conceived to compete against automated bot purchasing of PS5s and bring the power back to the user/consumer, better known as "item sniping". To even the playing field. This tool is also extremely robust and flexible. It can be configured to notify you of many other hard-to-find items when they are re-stocked by an online retailer, as it is user-configured. Once the user is notified and already logged into Safari, they can act swiftly on purchasing the item and offers at least some semblance of chance at competing against the automated online bot purchasing and scalping systems. Most importantly, given the inherent limitations of iOS Shortcuts, it encourages more responsible use of this tool. It is difficult, if not near impossible to repurpose it for the unintended purpose of bot scalping, itself. Instead, it is an end-user automated notification system, not a scalping bot. Therefore, it is part of the solution, rather than part of the problem.
How it works
The script works by checking a list of configurable websites of your choosing that contain specific keywords (while omitting others, also configurable by the user). While the purpose of this script was used to compete with PS5 scalping bots, this sniping utility does not automate the purchase (nor is it possible for it to). Rather, it simply automates notifying the user immediately, in the event an item is back in stock. For this reason, I don't recommend configuring this iOS Shortcut for any item that is routinely in stock and if a hard-to-find item becomes not-so-hard-to-find, disabling this script as it can spam your inbox. Moreover, if you don't have an unlimited data plan, don't consider installing this script, as it will cost you a ton of money if you do so. Moreover, the script cannot run without first manually configuring the automation interval within iOS Shortcuts > Automation section. In the event you wanted to check for an item, every 5 minutes, the user will need to setup 288 entries. Obviously, disabling and enabling all of these on a whim can be time prohibitive, so I would suggest also installing an optional cron script, configuring that to call PS574LK3R and then removing the cron line, when you no longer need to run it.
Encouraging responsible end-user use, by design
I have put off sharing this utility because I had to think long and hard about the ramifications of releasing it. I truly don't want Apple pulling back the features of iOS Shortcuts, in the event of their abuse. I don't condone their abuse and fortunately this is not a single/all-in-one solution for the automated purchasing of items. While these systems and scalping behavior may not yet be illegal within the US, I don't want to contribute to the problem, or encourage others to do so. Rather, the end-user needs to be well-equipped in the modern digital age to compete at a bot-level with item sniping because unfortunately, the scalpers are ruining the fun and magic for the rest of us. The goal of this script to to level-out the playing field and return agency back to the end-user and consumer so they can have a chance of obtaining these items without needing to resort to paying exorbitant amounts and further enabling these selfish behaviors.
If you have made it this far and understand the intended use and responsible use: then feel free to read on~! With great power, comes great responsibility. Don't ruin things for the rest of us...
Here are the scripts you'll need, along with their listed author
Below is a list of each script and its respective author:
Script Name | Author | Author Website | iCloud Link to Download Shortcut |
---|---|---|---|
PS574LK3R v3.0 | aeth | link | link |
Cron |
Josh Holtz | link | link |
Crontab |
Josh Holtz | link | link |
italics
denotes optional, but recommended/additional shortcut modules to install. The alternative is turning on/off all user-configured automations within the Shortcuts > Automation interface, or once Cron and Crontab is setup, deleting/modifying a cron syntax line within Crontab. Again, the user must first configure the desired intervals manually within Shortcuts > Automation by adding them one at a time, at desired interval apart and set to run every day and call the Crontab script. All intervals, or a subset of intervals must match the automation. For instance, if you have your automations set to run every 5 minutes, but you have your crontab syntax call set to run every 3 minutes, it won't run every 3 minutes, the first call that will match is 15 minutes and 30 minutes, respectively. So it's important you have it match, even if it's only a subset of the automation calls that are specified within the crontab syntax.
Setup
Bypassing Untrusted Shortcuts Warning
To set up this shortcut is fairly easy. However, there are a couple things you may need to tackle/wrangle with in the event that you are unable to import the shortcut because it is from an Untrusted source:
- First attempt to download and run the shortcut from your iOS device by tapping this link:
- If you're within the configuration screen, continue onto the next paragraph/section of this page.
- If it fails to load and nothing happens, then you will need to manually change your settings within iOS to trust unknown shortcuts downloaded from the internet:
- For iOS 14 or earlier, you may toggle the setting by accessing: Settings > Shortcuts > Enable Untrusted Shortcuts > Allow > [enter your iPhone passcode]
- For iOS 15 or later (or experience the problem where: Settings > Shortcuts > Enable Untrusted Shortcuts is grayed out and you cannot change the setting; from the home screen): the solution is to long-hold on Shortcuts App, Remove App and re-download/install it from the App Store application. To avoid having your prior shortcuts, forever deleted be sure to make sure you are signed into iCloud have have Shortcuts checked to sync over iCloud. Exercise caution, but otherwise you should be fine.
Configuring PS574LK3R
- The setup wizard will run you through inclusion and exclusionary terms. The inclusionary terms use OR logic, meaning if it contains THIS term, or THAT term, if either matches the script will trigger a notification. Conversely, the exclusionary terms must not contain any of the following terms using AND logic, meaning the page cannot contain any of those key words, or the notification will be suppressed.
- The next thing you must configure is a list of full URLs, along with prefixed https:// that point to the product page of interest. You can skip the inclusionary and exclusionary terms and keep the bhphoto entry to the A2 Macbook Air to test the script and see how it performs. However, you will need to later re-access setup (and configure it to your needs) by hitting the triple dot at the top right of the Shortcut, then the Settings at the top right of the Shortcut edit screen, then access the tab labeled "Setup". Modify the variables as necessary. Again this script works best on hard-to-find items. The PS5 is a perfect example of a hard-to-find item, even after it's release nearly two years later.
- After configuration, tap anywhere on the shortcut tile, other than the circle at the top right and it will manually launch the shortcut. You will want to run the shortcut once, manually, so you can address the permissions and troubleshoot to ensure everything is working. If so, with the test item you should receive an email. It is recommended to configure the script initially for one online retailer's website, and configure two URLS, one for an item that's in-stock and another for an item that's out-of-stock. That way you can ensure the script is working for that retailer. Once you know it's working, you an remove the in-stock item's URL. Repeat as necessary for additional online retailers. Please note, this script may not work with every online retailer, but it should work with most. For instance, if you were wanting to configure it for Sony's PS5 website, since the site uses so much dynamic javascript, you will notice the script does not function as expected. When in doubt, review the logs under: Files [app] > Shortcuts > PS574LK3R to see how the script is functioning after you configure it.
Using Shortcuts > Automation to schedule automated/background script execution
Fortunately, due to the introduction/advent of Automation to the Shortcuts app, by Apple, we can now run shortcuts in the background and scheduled to run autonomously, on an interval of your choosing. While you can setup 288 configurations to run PS574LK34 on 5 minute intervals throughout the day, you can imagine how enabling/disabling via toggle 288 automations is not practical. It's already a drudge to setup all 288, let alone toggling them on and off.
For this reason, I recommend two options. Either renaming PS574LK3R script and making a blank PS57LK3R script in its place, when you seek to de-activate it. Or, you can use this brilliantly conceived shortcut set that implements cron, natively on your phone. It won't get you out of configuring all 288 5-minute spaced intervals throughout the day. However, it will solve the issue of turning off/on or even reconfiguring, or dialing back the interval of notifications.
Examples of configuring Crontab
This should be a breeze for anyone who has previously worked in Dev/Sys Ops in a Linux environment. For everyone else, you can play around with this cron expression generator to achieve the desired interval effect. However, you must remind yourself that you are first bound to however many automations were originally setup in Shortcuts > Automation. Maximally, the intervals must match and not exceed the user-defined automation interval.
Follow this hypothetical: so you configure all 288 automations to point to the cron script. You then feed in the same intervals to match:
0,5,10,15,20,25,30,35,40,45,50,55 * * * * Crontab
The above will execute 288 times. Likewise, in order for this to work, your Shortcut > Automation section must also be configured on a matching interval. As you can see, from this example, you could not set it up to check in the intervals between every five minutes, as that would have unintended consequences/behavior.
In another example: let's say you wanted to reconfigure it to only execute it only 4 times per hour:
* */15 * * * * Crontab
In which case, you would need to configure 96 automations, once every 15 minutes.
At this point you might be asking, what's the benefit, if I'm having to mirror the intervals between Shortcut's Automation as it calls the Crontab script and the Crontab specifies the same in •NIX cron syntax. The simple answer is two fold: (1) you can specify it granularly for every minute, but then dial it down, as necessary and (2) by configuring the automation section to call the Crontab script, you can setup separate scripts to be called at a different, but interval matching subset and (3) lastly, by deleting the cron syntax line, you are disabling the script; likewise you can re-enable the script by specifying a valid cron syntax line. The latter avoids having to toggle on/off dozens, if not hundreds of scheduled automations.
Let me offer up one final example. Let's say you were down to manually setup 1440 automations to point to the cron script. This means the user-configured Shortcut > Automation intervals are once every minute, for the entirety of the day. That is fairly granular. You could then use the cron script to match that:
0 * * * * * Crontab
OR, you could dial it back to whichever minutes of the hour that you'd like, so long as the cron triggers match to a corresponding automator configured minute. Ideally, you wouldn't want to execute the script no more than once every 2-3 minutes, the first script may not have proper time to finish. That is why I suggest only configuring it for a maximally for 288 automations per day (this equates to running the script per the Crontab once every 5 minutes.
As far as disabling it is concerned, all you would have to do is remove the content of the text field within the crontab script. The automations / interval will still trigger, but with an empty cron call, no script that performs useful work will execute. From my experience, leaving it this way doesn't contribute heavily to battery drain. Finally, the final added benefit of using the Crontab script, is you can new-line delineate additional scripts you would like to automate without having to set up a separate, or second set of automation intervals.
How to I eliminate the annoying/prohibitive Automation notifications
Fortunately there is a simple solution, but these instructions must be repeated each time the phone is restarted.
- Visit Settings > Screen Time
- See All Activity
- Scroll down to the Notification section/metrics towards the bottom. You will see Shortcut app, but be unable to tap on it for the current day. You'll need to scroll back to a previous day that the Shortcut app was opened. You will then notice you can tap on it and you can disable all notifications. It is important to remember that we're not relying on Shortcut's native notifications because otherwise, every time the automation is ran, you will end up with a notification. This can cause a lot of distraction/background noise of extraneous notification that takes away from the purpose of using your phone as as a notification device for items in-stock.
Q&A
If you require additional assistance/troubleshooting, please reply to the this thread or the tech support discussions section of our site and I will do my best to assist you with the problem.
Share this project, or donate to this, or other projects!!
Are you head-over-heels that you got a PS5 and used this script to snipe for your very own?! Spread the love. Drop a donation to my GoFundMe (link at the bottom of every page), or join the community and share this project/site with your friends! Your support it truly appreciated under this unprecedented and difficult time in my health/personal life. Peace and love~!