From 236278f0b49ed70789209d3fcde223f21041f052 Mon Sep 17 00:00:00 2001 From: JustAnotherArchivist Date: Mon, 24 Feb 2020 03:10:57 +0000 Subject: [PATCH] Fix decoding of links on Facebook profiles --- social-media-extract-profile-link | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/social-media-extract-profile-link b/social-media-extract-profile-link index f8b14b7..9245bfd 100755 --- a/social-media-extract-profile-link +++ b/social-media-extract-profile-link @@ -21,7 +21,7 @@ function fetch_n_extract { if grep -qF '"tab_home"' <<<"${page}" then # Publicly accessible profile - grep -Po '"website_url":"\K[^"]+' <<<"${page}" | sed 's,\\/,/,g' | awk '!seen[$0]++' + grep -Po '"website_url":\K"[^"]+"' <<<"${page}" | python3 -c 'import json, sys'$'\n''for line in sys.stdin:'$'\n'' print(json.loads(line))' | awk '!seen[$0]++' elif grep -qF 'id="pagelet_loggedout_sign_up"' <<< "${page}" then # Profile overview only