Skip to main content

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-2.1.1.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ddg2rss-2.1.1-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

Details for the file ddg2rss-2.1.1.tar.gz.

File metadata

  • Download URL: ddg2rss-2.1.1.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.12.13

File hashes

Hashes for ddg2rss-2.1.1.tar.gz
Algorithm Hash digest
SHA256 1b3e3e3453ba3011467a591fd99c349c9e8fe16c94cc0b20e68384379c764dd2
MD5 0f47868ccf794acda6ad0c32ffbdd7b0
BLAKE2b-256 17da4818d2b1ceb388144fb296bd6749eb024acdd030ad8b41e8859fdea8a3c7

See more details on using hashes here.

File details

Details for the file ddg2rss-2.1.1-py3-none-any.whl.

File metadata

  • Download URL: ddg2rss-2.1.1-py3-none-any.whl
  • Upload date:
  • Size: 4.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.12.13

File hashes

Hashes for ddg2rss-2.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 06ec9245a1ba281f3b597c71ac1f6234d123a4b4c6de09c3f81baf349b641e00
MD5 286a5b1f55d180eaeddd5c4534b2d9ea
BLAKE2b-256 09a8f791fc9ded312991c8896f05c49c407e1804ffd93874175e76e8f0707347

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

2.1.1 This release

2 files

2.1.0

2 files

2.0.1

2 files

2.0.0

2 files

1.0.4

2 files

1.0.3

2 files

1.0.2

2 files

1.0.1

2 files

1.0.0

2 files

0.0.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page