TGPhind
TGPhind is a multithreaded tool and Python library for searching articles by title and template on Telegra.ph and its mirrors (Graph.org, Te.legra.ph).
Features
- Multithreaded article availability checking with configurable worker threads.
- Flexible article title template generator supporting ranges and letter sets.
- Automatic transliteration of Cyrillic titles into URL-compatible slugs.
- Support for HTTP/HTTPS proxies.
- Automatic mirror verification and URL mapping.
- Command-line interface (CLI) and Python API.
Installation
Install via pip:
pip install tgphind
Or via poetry:
poetry add tgphind
Quick Start
Python API Usage
from tgphind import TGPhind, Proxy
# Initialize the search engine
se = TGPhind(
max_th=16, # Worker threads count (defaults to CPU count)
proxy=None, # Optional Proxy(host='...', protocol='https')
brackets='<>' # Template delimiter brackets
)
# Search articles using a template pattern
results = se.search('article<s>-<a-d>')
# Map results across available mirrors
mapped_urls = se.map_hosts(results)
for urls in mapped_urls:
for url in urls:
print(url)
CLI Usage
Execute directly via the installed executable:
tgphind "article-<1-3>" -tc 8
Or run via the Python module:
python -m tgphind "article<s>-<a-d>" -tc 16
Command-line Options
query(required): Article title or pattern string.-tc,--threads-count: Number of threads to execute queries.-b,--brackets: Custom template bracket delimiters (default:<>).-x,--proxy: Proxy string formatted asprotocol://host:port.
Template Syntax
The search pattern generator expands patterns wrapped inside bracket delimiters <>:
- Single character:
<sgeneratessand an empty string. - Character ranges:
<a-d>expands toa,b,c,d. - Character sets:
<abc>generatesa,b,c. - Step ranges:
<a2g>generates characters with step 2 (a,c,e,g).
Example Expansion
Pattern article<s>-<a-d> generates the following titles:
article-a,article-b,article-c,article-darticles-a,articles-b,articles-c,articles-d
Each expanded title is tested against publication date patterns (MM-DD) and index suffixes (-2, -3, etc.).
Supported Mirrors
TGPhind automatically tests and maps links across these domains:
telegra.phgraph.orgte.legra.ph
License
This project is licensed under the MIT License.
Release files for tgphind 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| tgphind-1.1.0.tar.gz | 5.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| tgphind-1.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 12.1 kB
Release files / tgphind-1.1.0.tar.gz
| Download URL | tgphind-1.1.0.tar.gz |
|---|---|
| Size | 5.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7a4f620cf83aa87dd984e3c4c9ef8cff48735a2d2e7dd3470b006dec70721da7
|
|
BLAKE2b-256 checksum How to use checksums |
d6a7a5fcf7be897fcb0e8721a157b3e495f3e7dae68b75d179467abcc8891505
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.4.1 CPython/3.13.14 Linux/7.1.4-zen1
|
Release files / tgphind-1.1.0-py3-none-any.whl
| Download URL | tgphind-1.1.0-py3-none-any.whl |
|---|---|
| Size | 6.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
66b71265f292347d0f9f53d83c8a64619116a1929ca24baf05f12beee63cfb1d
|
|
BLAKE2b-256 checksum How to use checksums |
0cf2ddbf972a7a86157e63e895528a9f59cb7b8f7f1a3ced02e46659d4ece83b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.4.1 CPython/3.13.14 Linux/7.1.4-zen1
|