Created
October 28, 2014 21:54
-
-
Save vivekseth/78889d94eac1243464b9 to your computer and use it in GitHub Desktop.
Bypass Paywall on Most Websites (Bookmarklet)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
BOOKMARKLET IS AT BOTTOM OF COMMENT | |
Many paywalled websites like the New York Times disable their paywall when you access their content from social media or google. News websites want you to pay for their content, but they don't want to block traffic from search engines and social media because that would kill a large chunk of their traffic. | |
If you encounter a paywall when trying to view an article, all you need to do is find that article via google and click on the link from there. The paywall will be disabled and you will be able to view the article unfettered. | |
This bookmarklet streamlines that process. It scrapes the URL of the article for a unique identifier and searcesh google for that identifier. Google likely throw back the article you wanted to view as one of the top search results. | |
** Attention NYT and Others ** | |
You can disable this method in the following way: | |
If a user encountered a paywall when trying to view an article, block access to that article for some period of time. If time period is long enough, user would probably give up trying to access article. Perhaps 1 hour would be a sufficient time period | |
One implementation is maintaining a black-list of articles on a per-user basis. If a user encounters a paywall on an article, add it to the user's article-black-list and block access for some time-period. Identifying a user without having them sign in, is a tricky business, but i'll leave that up to you to figure out. | |
(Please note that this would not be a comprehensive solution. So long as non-identifiable users are allowed to access your content there is no way to create a comprehensive paywall--there will always be a way to get around it. In this way almost all implementations of paywalls are fundamentally flawed.) | |
*/ | |
javascript:(function()%7Bdocument.location %3D "https%3A%2F%2Fwww.google.com%2Fsearch%3Fq%3D"%2B(function() %7Bvar re %3D function (p%2C c)%7Bif (c !%3D "") p.push(c)%3B return p%7D%3Breturn document.location.href.split("%3F").reduce(re%2C %5B%5D)%5B0%5D.split("%23").reduce(re%2C %5B%5D)%5B0%5D.split(".html").reverse().reduce(re%2C %5B%5D)%5B0%5D.split("%2F").reverse().reduce(re%2C %5B%5D)%5B0%5D.split("%2C").reduce(re%2C %5B%5D)%5B0%5D%3B%7D)()%7D)() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment