Selaa lähdekoodia

Handle Twitter URLs with trailing slash

master
JustAnotherArchivist 5 vuotta sitten
vanhempi
commit
5984565417
1 muutettua tiedostoa jossa 2 lisäystä ja 1 poistoa
  1. +2
    -1
      snscrape-normalise

+ 2
- 1
snscrape-normalise Näytä tiedosto

@@ -32,8 +32,9 @@ do
fi
errorUrls+=("${url}")
echo "${url}"
elif [[ "${url}" =~ ^https?://(www\.)?twitter\.com/[^/]+$ ]]
elif [[ "${url}" =~ ^https?://(www\.)?twitter\.com/[^/]+/?$ ]]
then
url="${url%/}"
user="$(snscrape --max-results 1 twitter-user "${url##*/}" | grep -Po '^https?://twitter\.com/\K[^/]+')"
if [[ "${user}" ]]
then


Ladataan…
Peruuta
Tallenna