From 79420dd0b8a28600fb2b9f40d994fc70fd428fa5 Mon Sep 17 00:00:00 2001 From: pancake Date: Wed, 17 Jul 2024 02:38:19 +0200 Subject: [PATCH] Add duckduck go scrapping scripts --- examples/scrap-ddg.sh | 3 +++ examples/scrap-ddgweb.sh | 5 +++++ 2 files changed, 8 insertions(+) create mode 100755 examples/scrap-ddg.sh create mode 100755 examples/scrap-ddgweb.sh diff --git a/examples/scrap-ddg.sh b/examples/scrap-ddg.sh new file mode 100755 index 0000000..a846083 --- /dev/null +++ b/examples/scrap-ddg.sh @@ -0,0 +1,3 @@ +#!/bin/sh +# pip install ddgr +ddgr --json $@ diff --git a/examples/scrap-ddgweb.sh b/examples/scrap-ddgweb.sh new file mode 100755 index 0000000..be400ac --- /dev/null +++ b/examples/scrap-ddgweb.sh @@ -0,0 +1,5 @@ +#!/bin/sh +URLS=`./scrap-ddg.sh -n 4 $@ |jq '.[].url'` +for URL in ${URLS}; do + eval ./scrap-web.sh ${URL} +done