Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove redirects and tracking parameters from the urls #11

Open
kisst opened this issue Sep 28, 2017 · 2 comments
Open

Remove redirects and tracking parameters from the urls #11

kisst opened this issue Sep 28, 2017 · 2 comments

Comments

@kisst
Copy link

kisst commented Sep 28, 2017

  • current behaviour:

Single page visit goes across 2 redirect

curl -s -L -I $(curl -s https://librenews.io/api  | jq -r .latest[0].link) | grep -c ^Location
2

but even after that is filled up with an other 4 tracking parameters

curl -s -L -I $(curl -s https://librenews.io/api  | jq -r .latest[0].link) | grep "^Location" | tail -n 1 | cut -f2- -d? | sed -e $'s/&/\\\n/g' | wc -l
4
  • expected:

receive direct links without redirects and tracking parameters in the links

@milesmcc
Copy link
Owner

This would require some complex application logic, as it would involve the server having to de-mask the "tracker" urls. Currently, the LibreNews Server serves URLs just as they are provided by BBC: shortened.

Is this objectionable?

@kisst
Copy link
Author

kisst commented Sep 29, 2017

Objectionable maybe a strong word, but if with a little extra work, we can further reduce the user tracking, then why not.

I'm not sure how complex is it, most of the time this would work, at least with well behaved urls.

r = requests.get(url)
re_url = re.search('[^?]*', r.url )
clean_url = re_url.group(0)

I tested with all url-s in the feed, worked just fine, but I guess due to the traffic minimisation like in #5, this should be optional, at the same time the client side implementation of #6 would be a bigger help to reduce data.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants