DDG2RSS
Package python permettant de générer un flux rss au format xml, à partir de duckduckgo news, avec une recherche par mots clés.
Installation
python3 -m venv env
source env/bin/activate
pip install ddg2rss
Utilisation simple
>>> from ddg2rss.generator import rss_file
>>> rss_file(
link="https://public_link_of_your_output.xml",
keywords="Your search here",
output_dir="/absolute/or/relative/path/to/your/output/directory"
)
Installation sur un VPS avec une tâche cron
mkdir /opt/ddg2rss
cd /opt/ddg2rss
mkdir pages
python3 -m venv env
source env/bin/activate
pip install ddg2rss
vim .env
# entrer ou modifier les 3 lignes suivantes dans le fichier .env :
# OUTPUT_DIR="./pages" (dossier dans lequel seront créés les fichiers rss)
# URL="https://<racine de votre site>"
# SEARCH="./recherches" (fichier dans lequel seront listées vos recherches)
vim recherches # saisir une recherche par ligne
Faire pointer via nginx, apache ou autre, le lien URL vers le dossier renseigné dans la variable OUTPUT_DIR
Pour une actualisation toutes les 30 minutes, créer une tâche cron de ce type:
crontab -e
*/30 * * * * cd /opt/ddg2rss && ./env/bin/python -c "from ddg2rss import cronjob;cronjob.update()"
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ddg2rss-1.0.3.tar.gz
(3.8 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ddg2rss-1.0.3.tar.gz.
File metadata
- Download URL: ddg2rss-1.0.3.tar.gz
- Upload date:
- Size: 3.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
36a8a430720ca6efa16e59e653a84a738bae19ab7a845b008ddbd014f463916f
|
|
| MD5 |
236fd752eb13b327f0ab1ae8d8eb95f1
|
|
| BLAKE2b-256 |
7ad77d8e41c27f3c474a1d7e97fa5adbb3670de46fb916b2db0f0c81fa4612b7
|
File details
Details for the file ddg2rss-1.0.3-py3-none-any.whl.
File metadata
- Download URL: ddg2rss-1.0.3-py3-none-any.whl
- Upload date:
- Size: 4.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e9a3b22b34ebab781908c81bb823e713facb9d8d4678ecc35271bb06c315cc57
|
|
| MD5 |
cf198d90bc1f7794a2a8aa4e5d9e6600
|
|
| BLAKE2b-256 |
77ac874180c01ed70c3a8a228b4e4ea54128b12ee363b22f8229c3031cb3b482
|