Procházet zdrojové kódy

Ignore certain URLs on Twitter and Instagram entirely

master
JustAnotherArchivist před 4 roky
rodič
revize
9d712d64d7
1 změnil soubory, kde provedl 12 přidání a 0 odebrání
  1. +12
    -0
      url-normalise

+ 12
- 0
url-normalise Zobrazit soubor

@@ -84,6 +84,12 @@ do
echo "${line}"
elif [[ "${url}" =~ ^https?://(www\.)?twitter\.com/[^/]+/?(\?.*)?$ ]]
then
if [[ "${url}" =~ ^https?://(www\.)?twitter\.com/(i|web|search|hashtag)[/?] ]]
then
verbose_echo "Leaving Twitter URL alone: ${url}" >&2
echo "${line}"
continue
fi
verbose_echo "Normalising Twitter URL: ${url}" >&2
url="${url%%\?*}"
url="${url%/}"
@@ -98,6 +104,12 @@ do
fi
elif [[ "${url}" =~ ^https?://(www\.)?instagram\.com/[^/]+/?$ ]]
then
if [[ "${url}" =~ ^https?://(www\.)?instagram\.com/(p|explore)/ ]]
then
verbose_echo "Leaving Instagram URL alone: ${url}" >&2
echo "${line}"
continue
fi
verbose_echo "Normalising Instagram URL: ${url}" >&2
user="${url%/}"
user="${user##*/}"


Načítá se…
Zrušit
Uložit