Where is my PS5?! Is a cron-whatsapp bot that searches and scans Singapore Challenger's Hachi Tech for any Stock of PS5(Or any other search item of your liking). It can print and send whenever it has found a stock to the user, attached with link to the purchase. Pages are scanned every 1 second
Example is given for ps4 ( You can also change the search field)
- List of products found in that page that matches the
search_word
- For each product:
- Description
- Link
- Price(s)
- Search Page
- Image
1.Searches the page every 1 second 2. Pauses for 1 hour when a search is found, messaging the user.
Please ensure that the following secrets are setup for Twilio in your environment For your machine/container/rc
TWILIO_ACCOUNT_SID = os.environ.get("TWILIO_ACCOUNT_SID")
TWILIO_AUTH_TOKEN = os.environ.get("TWILIO_AUTH_TOKEN")
TWILIO_WHATSAPP_FROM = os.environ.get("TWILIO_FROM")
TWILIO_WHATSAPP_TO = os.environ.get("TWILIO_TO")`
TWILIO_TO accepts a comma separated list
example: of 2 numbers
os.environ['TWILIO_TO] = "123456,1234123"
- This is a free feature from Twilio to get free whatsapp messaging
- Users need to rejoin their sandbox channels
- We remind users every 70/72 hours to rejoin by replying to twilio
You can setup the reminder message here:
sandbox_rejoin_message = "join turquoise-dolphin"
They can be either modified in script main.py Or modified via environment variables
SEARCH_ITEM
- Case insensitive match if a product description contains this term.
Can be changed using the environment variable SEARCH_ITEM
HACHI_SEARCH_PAGE_LINK
- A category page in Hachi Tech, can be nested or unnested.
This is the page where our product may appear in.
The higher the level, the more irrelevant results.
Can be changed using the environment variable SEARCH_PAGE_LINK
We assume you have Python 3 installed
- Git clone the project
- Run the project by:
In your terminal:
python main.py
- Install dependencies
In your terminal:
pip install -r requirements.txt
- This was designed with pure Python in mind without bs4/scrapy so that I can run it in my crap-machine 24/7
- You can have the python script running constantly 24/7 in your own laptop as you work,
- Or you may setup a container yourself in GCP/AWS/Azure that constantly runs this in terminal
Whatsapp Alert Messaging I set it to search for Ps4 in this Image
Console Logs while its searching
I wrote it in 3 hours on a Saturday morning, I have a full time job and family and I just need something to get the job done.
It was intended that everything fits into a single main.py function because I have a crap 1ghz machine that pulls this script along other cron scripts to do my bidding. This runs 24/7
Listen, open source is where I put out my own creations for my own use, but I just happen to share it to the public out of my own free time and kindness.
You are free to make a request, but I have no obligation to work for you, unless you are my paymaster.
If your requests looks like something that will benefit >me< as well, then I will give it a shot and add it in.
PRs are welcome.