Add user agent header to imdb. They hate curl. - annna - Annna the nice friendly bot.
HTML git clone git://bitreich.org/annna/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/annna/
DIR Log
DIR Files
DIR Refs
DIR Tags
DIR README
---
DIR commit 702d12a1a2967f7a3fdc73b8115ff6b95f1aa680
DIR parent 7300e1f658b524573648c0c10721e5c18abd0d57
HTML Author: Annna Robert-Houdin <annna@bitreich.org>
Date: Thu, 22 Dec 2022 21:07:42 +0100
Add user agent header to imdb. They hate curl.
Diffstat:
M imdb2gopherbay | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
---
DIR diff --git a/imdb2gopherbay b/imdb2gopherbay
@@ -40,7 +40,9 @@ imdburi="$1"
#printf "%s\n" "${title}"
# Evil_Bob Ver2: Thanks!
-curl -H 'Accept-Language: en' -s "${imdburi}" \
+curl -H 'Accept-Language: en' \
+ -H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:103.0) Gecko/20100101 Firefox/103.0' \
+ -s "${imdburi}" \
| extractjson | sed 1q | json2tsv | LC_ALL=C awk '
BEGIN {
FS = OFS = "\t";