Skip to content

Commit

Permalink
Remove debug prints
Browse files Browse the repository at this point in the history
  • Loading branch information
wasi-master committed Aug 14, 2024
1 parent ffefe11 commit cbb1e85
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions app/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,19 +58,17 @@ def show_article():
return bypass_paywall(link)
except requests.exceptions.RequestException as e:
return str(e), 400
except e:
raise e
except Exception as exc:
raise exc


@app.route("/", defaults={"path": ""})
@app.route("/<path:path>", methods=["GET"])
def get_article(path):
print(path)
full_url = request.url
parts = full_url.split("/", 4)
if len(parts) >= 5:
actual_url = "https://" + parts[4].lstrip("/")
print(actual_url)
try:
return bypass_paywall(actual_url)
except requests.exceptions.RequestException as e:
Expand Down

0 comments on commit cbb1e85

Please sign in to comment.