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

Uploaded Source

Built Distribution

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

ddg2rss-1.0.3-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

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

Hashes for ddg2rss-1.0.3.tar.gz
Algorithm Hash digest
SHA256 36a8a430720ca6efa16e59e653a84a738bae19ab7a845b008ddbd014f463916f
MD5 236fd752eb13b327f0ab1ae8d8eb95f1
BLAKE2b-256 7ad77d8e41c27f3c474a1d7e97fa5adbb3670de46fb916b2db0f0c81fa4612b7

See more details on using hashes here.

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

Hashes for ddg2rss-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 e9a3b22b34ebab781908c81bb823e713facb9d8d4678ecc35271bb06c315cc57
MD5 cf198d90bc1f7794a2a8aa4e5d9e6600
BLAKE2b-256 77ac874180c01ed70c3a8a228b4e4ea54128b12ee363b22f8229c3031cb3b482

See more details on using hashes here.

Release history Release notifications | RSS feed

2.1.1

2 files

2.1.0

2 files

2.0.1

2 files

2.0.0

2 files

1.0.4

2 files

This release

1.0.3 This release

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