tInitial proxy POC. - acm-proxy - acm library proxy HTML git clone https://git.parazyd.org/acm-proxy DIR Log DIR Files DIR Refs DIR README --- DIR commit de1364b0c7e093357a91091d775e24a26a510fd2 HTML Author: parazyd <parazyd@dyne.org> Date: Tue, 31 Mar 2020 12:18:19 +0200 Initial proxy POC. Diffstat: A README | 3 +++ A proxy.py | 17 +++++++++++++++++ A scrape.js | 3 +++ 3 files changed, 23 insertions(+), 0 deletions(-) --- DIR diff --git a/README b/README t@@ -0,0 +1,3 @@ +npm install cloudscraper + +python requires flask DIR diff --git a/proxy.py b/proxy.py t@@ -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) DIR diff --git a/scrape.js b/scrape.js t@@ -0,0 +1,3 @@ +var args = process.argv; +var cloudscraper = require('cloudscraper'); +cloudscraper.get(args[2]).then(console.log, console.error);