Skip to content
This repository has been archived by the owner on Nov 2, 2020. It is now read-only.

Get daily reminder about certain Nike shoes stock on Nike ID Store via Telegram Channel

Notifications You must be signed in to change notification settings

alionar/nikeid-telegram-scrapper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nikeid-telegram-scrapper

Get daily reminder about certain Nike shoes stock on Nike ID Store via Telegram Channel

What to Prepare First?

  1. Install Python => 3.6
  2. Install dependencies python3 -m pip install -r requirements.txt
  3. Create Telegram bot to get token. How?.
  4. Make new Telegram channel and add your bot to channel. How?
  5. Get your Telegram channel Chat ID. How?
  6. Get Service Account on GCP and save it as client_secret.json in this repo folder. How?
  7. Enable Google Drive API and Sheet API for your project account on GCP. How?
  8. Create New Google Spreadsheet and delete all row except first one and then edit cell A1 and insert --END--.
  9. Copy the client_email inside client_secret.json. Back in your spreadsheet, click the Share button in the top right, and paste the client_email value into the People field to give it edit rights. Hit Send.
  10. Get sheet_id from spreadsheet that you already made before. How?
  11. Open and change variable value in _config.py.
URL_SEARCH = 'https://www.nike.com/id/w/jordan-1-lifestyle-high-top-shoes-13jrmz4fokyz6lqy0zy7ok'
TELEGRAM_TOKEN = '<YOUR_TELEGRAM_BOT_TOKEN>'
TELEGRAM_CHAT_ID = <YOUR_TELEGRAM_CHANNEL_CHAT_ID> #integer
SHEET_ID  = '<YOUR_SPREADSHEET_ID>'
TZ_NAME = '<YOUR_TIMEZONE>'
PROXY_HTTP = ''
PROXY_HTTPS = ''
PROXY_USER = ''
PROXY_PWD = ''

Edit this file with:

  • URL_SEARCH : URL Search for any Nike shoes available on Nike Store Indonesia. You can change it with another shoes.
  • TELEGRAM_TOKEN : Your Telegram Bot Token
  • TELEGRAM_CHAT_ID : Your Telegram Channel Chat ID
  • SHEET_ID: Your Spreadsheet ID
  • TZ_NAME: Your Timezone based on Olson's TZ Database Name

Run It!

  1. Download this script using Terminal/Command Line.
# Clone
git clone https://github.com/alionar/nikeid-telegram-scrapper.git
cd nikeid-telegram-scrapper 
  1. Use cron job on your Linux server or another job scheduller to run this command once a day.
python3 nikeid-telegram-scrapper.py

For example, i set up my crontab to run that command with this expression:

0 14 * * * python3 nikeid-telegram-scrapper.py

This command will be running everyday at 14:00 CEST (19:00 GMT+7, based on your server timezone)

  1. Profit.

About

Get daily reminder about certain Nike shoes stock on Nike ID Store via Telegram Channel

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages