Update w3m-reddit post about new m.reddit.com

This commit is contained in:
Tyler Hallada 2015-04-24 15:03:18 -04:00
parent 61b8ceea80
commit de223c1efa

View File

@ -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.