Skip to content

un4ckn0wl3z/Labubot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Labubot

License: WTFPL

Description

Popmart Automate Script

Demo

Installation

  1. Clone the repository and install dependencies using npm:

    git clone https://github.com/un4ckn0wl3z/Labubot.git
    cd Labubot
    npm install
  2. Install the following Chrome extensions for cookie and local storage export:

  3. Configure your credentials and file names for cookie and local storage in the _data/config.yml file:

    login_base:
      creds:
        username: 'your-username'
        password: 'your-password'
    
    cookie_base:
      cookie_file: 'cookie-file.json' # default is www.popmart.com.cookies.json
      storage_file: 'storage-file.json' # default is www.popmart.com.storage.json

    Replace 'your-username', 'your-password', 'cookie-file.json', and 'storage-file.json' with your actual credentials and file names.

  4. Edit your cookie and local storage data that you already exported from extension:

    • _data/www.popmart.com.cookies.json for cookies
    • _data/www.popmart.com.storage.json for for local storage
  5. Set your target product URL in the _data/config.yml file:

    target_product: 'https://www.popmart.com/th/products/xxxx'

Usage

Running Scripts

To run the script for bot login based:

npm run bot-login-based

To run the script for bot cookie based:

npm run bot-cookie-based

Other Scripts

Additional scripts include (PM2 required):

  • Start forecast bot cookie:

    npm run forecast-bot-cookie
  • Stop forecast bot cookie:

    npm run stop-forecast-bot-cookie

Dependencies

  • @types/colors: ^1.2.1
  • @types/figlet: ^1.5.8
  • colors: ^1.4.0
  • dayjs: ^1.11.11
  • figlet: ^1.7.0
  • js-yaml: ^4.1.0
  • puppeteer: ^22.12.1
  • ts-node: ^10.9.2

Dev Dependencies

  • @tsconfig/node18: ^18.2.4
  • typescript: ^5.5.3

License

This project is licensed under the WTFPL License. See the LICENSE file for details.

About

Popmart Automate Script

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published