The Washington Post - Paywall Bypass

Simple script to bypass paywalls on The Washington Post

  1. // ==UserScript==
  2. // @name The Washington Post - Paywall Bypass
  3. // @namespace http://tampermonkey.net/
  4. // @version 1.1
  5. // @description Simple script to bypass paywalls on The Washington Post
  6. // @author November2246
  7. // @match https://*.washingtonpost.com/*
  8. // @icon https://www.google.com/s2/favicons?sz=64&domain=washingtonpost.com
  9. // @grant none
  10. // @run-at document-start
  11. // @license ISC
  12. // ==/UserScript==
  13.  
  14. // Hooks responses from */tetro/metering/evaluate ;)
  15. const _parse = JSON.parse;
  16. JSON.parse = function parse() {
  17. let obj = _parse.apply(this, arguments);
  18.  
  19. if (propCheck(obj, ['status', 'action', 'data', 'granted'])) {
  20. obj.granted = true;
  21. obj.data.userAttributes.isSubscriber = true;
  22. obj.data.userAttributes.isAsub = true;
  23. obj.data.userAttributes.isSignedOutSubscriber = true;
  24. obj.data.userAttributes.isRestricted = false;
  25. obj.data.userAttributes.paymentMethod = 'PAYPAL';
  26.  
  27. obj.data.targetingAttributes.requiresInlineRegwall = false;
  28. if (Array.isArray(obj.data.targetingAttributes.targetCodes)) {
  29. obj.data.targetingAttributes.targetCodes = obj.data.targetingAttributes.targetCodes.filter(x => !String(x).includes('pay'));
  30. }
  31.  
  32. obj.data.token.isAppSubscriber = true;
  33. obj.data.action = -1;
  34. obj.action = -1;
  35. }
  36.  
  37. return obj;
  38. };
  39.  
  40. function propCheck(obj, propertiesArr) {
  41. const props = Object.getOwnPropertyNames(obj);
  42. return (props.length === propertiesArr.length) && propertiesArr.every(x => props.includes(x));
  43. }

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址