From c5cf1359762274a17fb139944405c02618996700 Mon Sep 17 00:00:00 2001 From: Mark Powers Date: Mon, 23 Nov 2020 20:21:59 -0600 Subject: Fix youtube feeds --- twitter.js | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 twitter.js (limited to 'twitter.js') diff --git a/twitter.js b/twitter.js new file mode 100644 index 0000000..1f21047 --- /dev/null +++ b/twitter.js @@ -0,0 +1,10 @@ +function get_twitter(url) { + let pattern = /twitter.com\/(\w+).*/ + let match = url.match(pattern); + if (match) { + let twitter_handle = match[1] + let feed_url = `${base_url}/?action=display&bridge=Twitter&context=By+username&u=${twitter_handle}&format=` + return get_all_types(feed_url) + } + return [] +} -- cgit v1.2.3