瀏覽代碼

Handle Twitter URLs with trailing slash

master
JustAnotherArchivist 5 年之前
父節點
當前提交
5984565417
共有 1 個檔案被更改,包括 2 行新增1 行删除
  1. +2
    -1
      snscrape-normalise

+ 2
- 1
snscrape-normalise 查看文件

@@ -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


Loading…
取消
儲存