Giter Site home page Giter Site logo

vintedpy's Introduction

Vinted Alerting Bot

I decided to open-source by Vinted alerting bot. This bot will inform you via Discord message when new articles that correspond to your criteria are posted on Vinted.

Changelog

09/05/2023 โ€”ย Bug fixes / Important notice

I haven't updated this bot for like a year. This bot is now back working with following changes:

  • Fixed major bug due to Lightbulb change in the way of making embedded messages
  • Tokens are now fetched via iOS client instead of web session
  • Added an interval parameter in the environments
  • Removed tenacity and retrying decorators, this may create an infinite loop.

How it works?

Once installed, your Discord server will have 3 new commands registered:

/subscriptions # Display the list of your subscribed searches with ID
/subscribe [channel] [url] # Subscribe to a new search and receive alerts in a channel
/unsubscribe [id] # Unsubscribe of an alert with its ID

Once you saved a subscription, the bot will fetch new articles every 30 seconds and alert you in case of new findings!

Creating bot on Discord Developer

  1. Create an application on Discord Developer
  2. Create a bot in your application
  3. Copy the .env.example file to .env and copy/paste the token
  4. Invite your bot by generating an URL (OAuth2 -> URl Generator)

Important: Set the following scopes:

  • bot
  • applications.commands

And also set the following bot permission:

  • Send Messages
  • Embed Links
  • Read Messages/View Channels
  • Use Slash Commands

Installation

You must have python3 and pip3 installed, Python >3.8 is recommended.

  1. Install dependencies: pip3 install -r requirements.txt
  2. Start the bot: python3 main.py

If you want to stop the bot, you can just press CTRL+C once. Don't spam CTRL+C, it may take a few seconds before it completely stop because of the background thread used to sync items.

Keeping the bot up all the time

I highly recommend running this bot via a service on Linux distributions.

Here is an example of a Linux service, you will certainly need to change paths:

[Unit]
Description=vinted_scraper
After=network.target

[Service]
ExecStart=python3 /root/vintedpy/main.py
EnvironmentFile=/root/vintedpy/.env
Restart=on-failure
SyslogIdentifier=vinted
RestartSec=5
TimeoutStartSec=infinity

[Install]
WantedBy=multi-user.target

vintedpy's People

Contributors

vlourme avatar phoz0n avatar

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.