diff --git a/README.md b/README.md new file mode 100644 index 0000000..a25f98a --- /dev/null +++ b/README.md @@ -0,0 +1,45 @@ +# 13 Feet Ladder + +A site similar to [12ft.io](https://12ft.io) but is self hosted and is more smooth + +## What is this? + +This is a simple self hosted server that has a simple but powerful interface to block ads, paywalls, and other nonsense. Specially for sites like medium, new york times which have paid articles that you normally cannot read. Now I do want you to support the creators you benefit from but if you just wanna see one single article and move on with your day then this might be helpful + +## How does it work? + +It pretends to be GoogleBot (Google's web crawler) and gets the same content that google will get. Google gets the whole page so that the content of the article can be indexed properly and this takes advantage of that. + +## How do I use it? + +First make sure you have [python](https://python.org) installed on your machine, then go to a terminal (`Command Prompt` on Windows, `Terminal` on Mac) and run the following command: + +```sh +python -m pip install flask +``` + +If that doesn't work retry but replace `python` with `py`, then try `python3`, then try `py3` + +Then download the file and run it, click [this link](https://realpython.com/run-python-scripts/) for a tutorial on how to run python scripts + +Then follow these simple steps + +### Step 1 + +![step 1 screenshot](screenshots/step-1.png) +Go to the website at the url shown in the console + +### Step 2 + +![step 2 screenshot](screenshots/step-2.png) +Click on the input box + +### Step 3 + +![step 3 screenshot](screenshots/step-3.png) +Paste your desired url + +### Step 4 + +![step 4 screenshot](screenshots/step-4.gif) +VoilĂ  you now have bypassed the paywall and ads diff --git a/index.html b/index.html new file mode 100644 index 0000000..8255b1e --- /dev/null +++ b/index.html @@ -0,0 +1,80 @@ + + + + + 13ft Ladder + + + + + + + + + +
+
+

+ +

+
+ + +
+
+ + diff --git a/index.py b/index.py new file mode 100644 index 0000000..eedd349 --- /dev/null +++ b/index.py @@ -0,0 +1,29 @@ +import flask +import requests + +app = flask.Flask(__name__) +googlebot_headers = { + "User-Agent": "Mozilla/5.0 (Linux; Android 6.0.1; Nexus 5X Build/MMB29P) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/W.X.Y.Z Mobile Safari/537.36 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)" +} + + +def bypass_paywall(url): + """ + Bypass paywall for a given url + """ + response = requests.get(url, headers=googlebot_headers) + return response.text + + +@app.route("/") +def main_page(): + return flask.send_from_directory(".", "index.html") + + +@app.route("/article", methods=["POST"]) +def show_article(): + link = flask.request.form["link"] + return bypass_paywall(link) + + +app.run(debug=True) diff --git a/screenshots/step-1.png b/screenshots/step-1.png new file mode 100644 index 0000000..f3e47cf Binary files /dev/null and b/screenshots/step-1.png differ diff --git a/screenshots/step-2.png b/screenshots/step-2.png new file mode 100644 index 0000000..7c70ca6 Binary files /dev/null and b/screenshots/step-2.png differ diff --git a/screenshots/step-3.png b/screenshots/step-3.png new file mode 100644 index 0000000..9309b2e Binary files /dev/null and b/screenshots/step-3.png differ diff --git a/screenshots/step-4.gif b/screenshots/step-4.gif new file mode 100644 index 0000000..ac2b627 Binary files /dev/null and b/screenshots/step-4.gif differ