Update README.md
This commit is contained in:
91
README.md
91
README.md
@@ -1,48 +1,67 @@
|
|||||||
# Wallamonitor
|
|
||||||
Periodically checks Wallapop for new articles based on specified parameters and notify them through Telegram channel.
|
|
||||||
|
|
||||||
### Setup 🔧
|
# Wallamonitor 📲
|
||||||
```
|
**Automate your Wallapop searches and get notified on Telegram when new items are listed!**
|
||||||
pip3 install pyyaml python-telegram-bot
|
This bot periodically searches Wallapop for new items based on your specific parameters and sends real-time notifications to your designated Telegram channel.
|
||||||
```
|
|
||||||
|
|
||||||
You will also need to set your Telegram config at `config.yaml`:
|
---
|
||||||
```
|
|
||||||
TELEGRAM_CHANNEL_ID=@Your_Telegram_Channel_ID
|
|
||||||
TELEGRAM_TOKEN=Your Telegram Token
|
|
||||||
```
|
|
||||||
|
|
||||||
### Usage
|
## Table of Contents
|
||||||
1. Create a `args.json` file and fill it with following parameters (JSON):
|
- [Setup](#setup-)
|
||||||
|
- [Configuration](#configuration-)
|
||||||
|
- [Parameters](#parameters-)
|
||||||
|
- [Usage](#usage-)
|
||||||
|
---
|
||||||
|
|
||||||
```
|
## Setup 🔧
|
||||||
[
|
|
||||||
{
|
|
||||||
"search_query": "search query", # Find products containing...
|
|
||||||
"latitude": "40.4165", # Latitude origin for distance search
|
|
||||||
"longitude": "-3.70256", # Longitude origin for distance search
|
|
||||||
"max_distance":"0", # Distance search range (in meters). Use 0 for unlimited distance
|
|
||||||
"condition": "all", # Can be: all, new, as_good_as_new, good, fair, has_given_it_all
|
|
||||||
"min_price": "20", # Minimum price
|
|
||||||
"max_price": "80", # Maximum price
|
|
||||||
"title_exclude" : [], # Exclude an item if title contains one of this words
|
|
||||||
"description_exclude": [], # Exclude an item if description contains one of this words
|
|
||||||
"title_must_include" : [], # Exclude an item if title does not contains one of this words
|
|
||||||
"description_must_include" : [] # Exclude an item if description does not contains one of this words
|
|
||||||
},
|
|
||||||
|
|
||||||
|
1. Install required packages:
|
||||||
|
```bash
|
||||||
|
pip3 install -r requirements.txt
|
||||||
|
```
|
||||||
|
|
||||||
|
2. Configure your Telegram details in `config.yaml`:
|
||||||
|
```yaml
|
||||||
|
TELEGRAM_CHANNEL_ID: "@Your_Telegram_Channel_ID"
|
||||||
|
TELEGRAM_TOKEN: "Your Telegram Token"
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Configuration 🛠️
|
||||||
|
|
||||||
|
Create an `args.json` file with your search parameters. This file tells Wallamonitor what items you’re looking for, such as price range, condition, and other criteria. You can set multiple search configurations within this file.
|
||||||
|
|
||||||
...
|
|
||||||
]
|
|
||||||
|
|
||||||
```
|
### Parameters:
|
||||||
|
| Parameter | Description | Example | Mandatory |
|
||||||
|
|----------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------|-------------------|
|
||||||
|
| `search_query` | Main search term. Only items containing this phrase in their title will be found. | `"laptop"` | **Yes** |
|
||||||
|
| `min_price` | Minimum item price. | `"100"` | **Yes** |
|
||||||
|
| `max_price` | Maximum item price. | `"500"` | **Yes** |
|
||||||
|
| `latitude` | Latitude of your location for distance-based filtering. | `"40.4165"` | No |
|
||||||
|
| `longitude` | Longitude of your location for distance-based filtering. | `"-3.70256"` | No |
|
||||||
|
| `max_distance` | Search range (in meters) from the specified latitude/longitude. Use `"0"` for no limit. | `"10000"` | No |
|
||||||
|
| `condition` | Item condition to filter by. Options: `all`, `new`, `as_good_as_new`, `good`, `fair`, `has_given_it_all`. | `"good"` | No |
|
||||||
|
| `title_exclude` | List of words that, if present in the title, will exclude an item. | `["broken", "parts"]` | No |
|
||||||
|
| `description_exclude` | List of words that, if present in the description, will exclude an item. | `["damaged"]` | No |
|
||||||
|
| `title_must_include` | List of required words in the title. If none of these words appear, the item will be excluded. | `["Intel", "i5"]` | No |
|
||||||
|
| `description_must_include` | List of required words in the description. If none of these words appear, the item will be excluded. | `["working"]` | No |
|
||||||
|
| `title_first_word_include` | Notify only if the first word of the title matches the specified word. | `"New"` | No |
|
||||||
|
|
||||||
Check the file `args.json` of this repo for an example.
|
Check out [args.json](./args.json) for an example
|
||||||
|
|
||||||
|
## Usage 🚀
|
||||||
|
|
||||||
2. Run:
|
1. Ensure your `args.json` file is filled out with the parameters you’d like Wallamonitor to use for its searches.
|
||||||
```
|
2. Run Wallamonitor:
|
||||||
$ python3 main.py
|
|
||||||
```
|
|
||||||
|
|
||||||
|
```bash
|
||||||
|
python3 wallamonitor.py
|
||||||
|
```
|
||||||
|
|
||||||
|
The bot will monitor Wallapop periodically (default 15s) and send notifications to your specified Telegram channel whenever new items match your criteria.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
Feel free to reach out if you have any issues with Wallamonitor or have suggestions to improve it. Happy shopping! 🛒📲
|
||||||
|
|||||||
Reference in New Issue
Block a user