tscrape_update: escape { and } in sed expression - tscrape - twitter scraper
(HTM) git clone git://git.codemadness.org/tscrape
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit dc41402d290af10b6695824342339cba108cc6c0
(DIR) parent 0ec2e56f6971b7e33e84fc35aeaa796f9044554e
(HTM) Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Thu, 1 Oct 2020 20:10:06 +0200
tscrape_update: escape { and } in sed expression
Thanks anthk for reporting it.
Diffstat:
M tscrape_update | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
(DIR) diff --git a/tscrape_update b/tscrape_update
@@ -49,7 +49,7 @@ guesttoken() {
curl -X POST -L --max-redirs 0 -H "User-Agent:" -f -s -m 15 \
-H "Authorization: Bearer ${bearer}" \
'https://api.twitter.com/1.1/guest/activate.json' 2>/dev/null | \
- sed -nE 's@.*{"guest_token":"([^"]*)"}.*@\1@p'
+ sed -nE 's@.*\{"guest_token":"([^"]*)"\}.*@\1@p'
}
# fetch a feed via HTTP/HTTPS etc.