1
0
Fork 0

readwwwlog: Use id variable everywhere

This commit is contained in:
tastytea 2022-04-25 15:12:04 +02:00
parent a2f2c4c6bc
commit 239e4d293c
Signed by: tastytea
SSH Key Fingerprint: SHA256:FBkvrOlhq5use1XEttyUGT4bUTDVA1ar9SgIc9P03cM
1 changed files with 2 additions and 1 deletions

View File

@ -21,7 +21,8 @@ for url in ${urls}; do
if [[ ${url} =~ 'dpaste\.com' && ! ${url[-4,-1]} == ".txt" ]]; then
url+=".txt"
elif [[ ${url} =~ 'pastebin\.com' && ! ${url} =~ '/raw/' ]]; then
url="https://pastebin.com/raw/${url##*/}"
local id=${url##*/}
url="https://pastebin.com/raw/${id}"
elif [[ ${url} =~ 'irccloud\.com' && ! ${url} =~ '/raw/' ]]; then
local id=${${(@s:/:)url}[4]}
url="https://www.irccloud.com/pastebin/raw/${id}"