Call Repl.it from Apps Script
I have this repl.it python code which is supposed to make some scrapping and return the price of the item.
I want to call it using apps script with something like:
And return the output of the scrap as a result to the apps script which is running.
Is that possible? Anywhere I can read how to do it?
You can have a flask server like so
from flask import * def scrape(): #your code for scraping here return scraped_output app=Flask ("main") @app.route("/") def main(): return scrape() app.run(host="0.0.0.0")
Then you can fetch to that URL
It will be like this repl-name.username.repl.co
@19ecal did a basic call to test it out but it only works inside repl.it, not when I call it from a browser with the url:
This site can’t be reached
amazon-selenium-navigator.herreracarlos81.repl.co took too long to respond.
this is the new repl.it which I changed just to test the return
Any clues what I am doing wrong?
@HerreraCarlos81 I just figured out what I was missing and it works with beautifulsoup! Awesome. Will try to make same adjustment to see if I can get Selenium to work as well.
The problem was with my Python return code itself 🤦♂️, I hadn't noticed that before since I was just printing the result and not returning.