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.4.tar.gz (3.9 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.4-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ddg2rss-1.0.4.tar.gz
  • Upload date:
  • Size: 3.9 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.4.tar.gz
Algorithm Hash digest
SHA256 53f43048b476331eccfb448e61bb98d76c54492a5cd95228f8274f52777eac59
MD5 386ad921ec906d225aebb7888f889327
BLAKE2b-256 81766211dd4891915e3d15015cca10e8619d17b2e9d80c38e5d1818b5664555c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ddg2rss-1.0.4-py3-none-any.whl
  • Upload date:
  • Size: 4.6 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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 99be50049d28af5ac4c378385de86416f6e281d01d7922bcc754aa19698d88fa
MD5 d259e131132cefecb68758821f2a1fa8
BLAKE2b-256 2f57a4dd0c45561877b806a082913133acbd2a47b7891c51c4d786d8f2d2a01f

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

This release

1.0.4 This release

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