telegram-pm 0.1.1__py3-none-any.whl → 0.1.3__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {telegram_pm-0.1.1.dist-info → telegram_pm-0.1.3.dist-info}/METADATA +27 -4
- {telegram_pm-0.1.1.dist-info → telegram_pm-0.1.3.dist-info}/RECORD +5 -5
- {telegram_pm-0.1.1.dist-info → telegram_pm-0.1.3.dist-info}/LICENSE +0 -0
- {telegram_pm-0.1.1.dist-info → telegram_pm-0.1.3.dist-info}/WHEEL +0 -0
- {telegram_pm-0.1.1.dist-info → telegram_pm-0.1.3.dist-info}/entry_points.txt +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.3
|
2
2
|
Name: telegram-pm
|
3
|
-
Version: 0.1.
|
3
|
+
Version: 0.1.3
|
4
4
|
Summary: Telegram preview page parser
|
5
5
|
Author: Your Name
|
6
6
|
Author-email: you@example.com
|
@@ -23,7 +23,7 @@ Description-Content-Type: text/markdown
|
|
23
23
|

|
24
24
|

|
25
25
|
|
26
|
-
|
26
|
+
Telegram monitoring tool for public channels that can be viewed via WEB preview. Extracts data about messages and media files and stores all data in a database. No tokens or bots are required for monitoring. Just launch the app and collect information non-stop in the database.
|
27
27
|
|
28
28
|
## 🌟 Features
|
29
29
|
1. [x] Parsing recent messages from public Telegram channels
|
@@ -85,7 +85,7 @@ poetry install
|
|
85
85
|
| `--verbose`/`--v` | Verbose mode | ➖ |
|
86
86
|
| `--help`/`--h` | Help information | ➖ |
|
87
87
|
|
88
|
-
**Poetry
|
88
|
+
**Poetry:**
|
89
89
|
```bash
|
90
90
|
poetry run tpm --ch freegaza --ch BREAKINGNewsTG --db-path .\tg.db --v
|
91
91
|
```
|
@@ -93,7 +93,7 @@ or
|
|
93
93
|
```bash
|
94
94
|
poetry run tpm --channels-filepath /path/to/monitoring_usernames.txt --db-path .\tg.db
|
95
95
|
```
|
96
|
-
**Docker
|
96
|
+
**Docker:**
|
97
97
|
```bash
|
98
98
|
docker run -it --rm tpm --ch freegaza --db-path test_tg.db --v
|
99
99
|
```
|
@@ -109,6 +109,29 @@ docker run -it --rm \
|
|
109
109
|
-v ~/tpm_data_dir/usernames.txt:/data/usernames.txt \
|
110
110
|
telegram_pm --db-path /data/telegram_messages.sqlite --chf /data/usernames.txt
|
111
111
|
```
|
112
|
+
**Python:**
|
113
|
+
```python
|
114
|
+
from telegram_pm.run import run_tpm
|
115
|
+
|
116
|
+
|
117
|
+
run_tpm(
|
118
|
+
db_path="tg.db", # Path to sqlite database
|
119
|
+
channels=["channel1", "channel2"], # Channels list
|
120
|
+
verbose=True, # Verbose mode
|
121
|
+
|
122
|
+
# Configuration (optional)
|
123
|
+
tg_iteration_in_preview_count=5, # Number of requests (default 5). 20 messages per request. (1 iter - last 20 messages)
|
124
|
+
tg_sleep_time_seconds=60, # Number of seconds after which the next process of receiving data from channels will begin (default 60 seconds)
|
125
|
+
tg_sleep_after_error_request=30, # Waiting after a failed requests (default 30)
|
126
|
+
http_retries=3, # Number of repeated request attempts (default 3)
|
127
|
+
http_backoff=3, # Delay between attempts for failed requests (default 3 seconds)
|
128
|
+
http_timeout=60, # Waiting for a response (default 30 seconds)
|
129
|
+
http_headers={ # HTTP headers
|
130
|
+
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36"
|
131
|
+
}
|
132
|
+
)
|
133
|
+
```
|
134
|
+
|
112
135
|
## 🗃️ Database Structure
|
113
136
|
|
114
137
|
The tables will be named as usernames. Each table is a username that was passed in the running parameters.
|
@@ -15,8 +15,8 @@ telegram_pm/utils/__init__.py,sha256=loG7JOo8Th7vV7lYrVeCEhObguEaMQr7xRCmVkV7CM4
|
|
15
15
|
telegram_pm/utils/logger.py,sha256=RqwcrFNMzjQfqB-aC9w79g9WLbcj6GvokRDtj9ZPH1Y,123
|
16
16
|
telegram_pm/utils/parse.py,sha256=vSI4kNVvt2hqXLcOdp0MuCChG6fFqSrb17VzH6huqVQ,1167
|
17
17
|
telegram_pm/utils/url.py,sha256=mv5Lc4PZbyL4hQXku3sGzMt3lmGKjtlYhbmzL0fKeb8,941
|
18
|
-
telegram_pm-0.1.
|
19
|
-
telegram_pm-0.1.
|
20
|
-
telegram_pm-0.1.
|
21
|
-
telegram_pm-0.1.
|
22
|
-
telegram_pm-0.1.
|
18
|
+
telegram_pm-0.1.3.dist-info/entry_points.txt,sha256=dIvBN0V4aMrJKl7tB1qCYy7VM40uFqnuwcPibXfnSU0,40
|
19
|
+
telegram_pm-0.1.3.dist-info/LICENSE,sha256=kaLyGzbJPljgIIJrGiWc2611z1YfjYG8QsI6v0C_oug,1066
|
20
|
+
telegram_pm-0.1.3.dist-info/METADATA,sha256=oBdSMbKZlzMKzn3i8jr1WmzwAUT4rzaxWTQwLMOn1cw,8402
|
21
|
+
telegram_pm-0.1.3.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
|
22
|
+
telegram_pm-0.1.3.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|