Introduction
Introduction Statistics Contact Development Disclaimer Help
Move towards grabtitle strategy for imdb title. - annna - Annna the nice friend…
git clone git://bitreich.org/annna/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws6…
Log
Files
Refs
Tags
README
---
commit c4b73693b2ab8fbd5982798638e4083848a3cce0
parent 0925485876164dc16cd6dd149ec600ba690b117a
Author: Annna Robert-Houdin <[email protected]>
Date: Sun, 5 Dec 2021 20:02:20 +0100
Move towards grabtitle strategy for imdb title.
Diffstat:
M imdb2gopherbay | 16 +++++++++++-----
1 file changed, 11 insertions(+), 5 deletions(-)
---
diff --git a/imdb2gopherbay b/imdb2gopherbay
@@ -1,11 +1,14 @@
#!/bin/sh
+export PATH="/home/annna/bin:$PATH"
+
if [ $# -lt 1 ];
then
printf "usage: %s imdburi\n" "$(basename "$0")" >&2
exit 1
fi
+# TODO: See, if this is needed eventually, if title changes.
extractjson() {
awk '
/<script id="__NEXT_DATA__"/ {
@@ -19,11 +22,14 @@ awk '
imdburi="$1"
title="$(curl -s "${imdburi}" \
- | extractjson \
- | json2tsv \
- | grep associatedTitle.originalTitleText.text \
- | head -n 1 \
- | cut -f 3)"
+ | grabtitle \
+ | sed 's, - IMDb,,')"
+
+# | extractjson \
+# | json2tsv \
+# | grep associatedTitle.originalTitleText.text )"
+# | head -n 1 \
+# | cut -f 3)"
[ -z "${title}" ] && exit 1
You are viewing proxied material from bitreich.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.