From de223c1efa58bf7be1953db3150ef3437073e4d9 Mon Sep 17 00:00:00 2001 From: Tyler Hallada Date: Fri, 24 Apr 2015 15:03:18 -0400 Subject: [PATCH] Update w3m-reddit post about new m.reddit.com --- _posts/2013-06-04-w3m-reddit.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/_posts/2013-06-04-w3m-reddit.md b/_posts/2013-06-04-w3m-reddit.md index 2213400..311fc5e 100644 --- a/_posts/2013-06-04-w3m-reddit.md +++ b/_posts/2013-06-04-w3m-reddit.md @@ -45,8 +45,8 @@ done args+=("$@") for arg in "${args[@]}" ; do # Switch to mobile reddit - url=${arg/http:\/\/reddit.com/http:\/\/m.reddit.com} - url=${url/http:\/\/www.reddit.com/http:\/\/m.reddit.com} + url=${arg/http:\/\/reddit.com/https:\/\/m.reddit.com} + url=${url/http:\/\/www.reddit.com/https:\/\/m.reddit.com} # Fix double backslash error in comment uri for mobile reddit url=${url/\/\/comments/\/comments} if [[ $t == "1" ]]; then @@ -93,3 +93,9 @@ scrapping the whole thing and starting over in Python instead. Stay tuned for more posts on how I view images and videos efficiently from the command-line. + +EDIT 04/25/2015: Reddit seems to have gotten rid of their old mobile reddit site +and replaced it with a more modern version that unfortunately doesn't look as +good in w3m. It still gets rid of a lot of header junk that is present in the +desktop version, though. It also doesn't work over http, so I edited the script +to always switch to https.