acm-proxy

acm library proxy
git clone https://git.parazyd.org/acm-proxy
Log | Files | Refs | README

commit de1364b0c7e093357a91091d775e24a26a510fd2
Author: parazyd <parazyd@dyne.org>
Date:   Tue, 31 Mar 2020 12:18:19 +0200

Initial proxy POC.

Diffstat:
AREADME | 3+++
Aproxy.py | 17+++++++++++++++++
Ascrape.js | 3+++
3 files changed, 23 insertions(+), 0 deletions(-)

diff --git a/README b/README @@ -0,0 +1,3 @@ +npm install cloudscraper + +python requires flask diff --git a/proxy.py b/proxy.py @@ -0,0 +1,17 @@ +#!/usr/bin/env python3 + +from flask import Flask, render_template +from subprocess import check_output + +app = Flask(__name__) + +def get_page(page): + return check_output(["node", "scrape.js", page]) + +@app.route('/') +def main(): + return get_page('https://dl.acm.org/loi/csur') + + +if __name__ == '__main__': + app.run(host='127.0.0.1', port='8091', debug=True) diff --git a/scrape.js b/scrape.js @@ -0,0 +1,3 @@ +var args = process.argv; +var cloudscraper = require('cloudscraper'); +cloudscraper.get(args[2]).then(console.log, console.error);