Skip to content

Commit

Permalink
Add tumblr to /go.
Browse files Browse the repository at this point in the history
  • Loading branch information
stefansundin committed Nov 26, 2017
1 parent 7f0e7b8 commit 6544e42
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
redirect "/soundcloud?#{params.to_querystring}"
elsif /^https?:\/\/(?:www\.)?mixcloud\.com/ =~ params[:q]
redirect "/mixcloud?#{params.to_querystring}"
elsif /^https?:\/\/(?:www\.)?twitch\.tv/ =~ params[:q]
elsif /^https?:\/\/(?:www\.|go\.)?twitch\.tv/ =~ params[:q]
redirect "/twitch?#{params.to_querystring}"
elsif /^https?:\/\/(?:www\.)?speedrun\.com/ =~ params[:q]
redirect "/speedrun?#{params.to_querystring}"
Expand All @@ -56,6 +56,8 @@
redirect "/imgur?#{params.to_querystring}"
elsif /^https?:\/\/(?<user>[a-zA-Z0-9\-]+)\.deviantart\.com/ =~ params[:q]
redirect "https://backend.deviantart.com/rss.xml?type=deviation&q=by%3A#{user}+sort%3Atime"
elsif /^(?<baseurl>https?:\/\/[a-zA-Z0-9\-]+\.tumblr\.com)/ =~ params[:q]
redirect "#{baseurl}/rss"
elsif /^https?:\/\/itunes\.apple\.com\/.+\/id(?<id>\d+)/ =~ params[:q]
# https://itunes.apple.com/us/podcast/the-bernie-sanders-show/id1223800705
response = HTTP.get("https://itunes.apple.com/lookup?id=#{id}")
Expand Down

0 comments on commit 6544e42

Please sign in to comment.