What is a good way to call a python script from a Google Sheets spreadsheet?What is the quickest way to HTTP GET in Python?What is a clean, pythonic way to have multiple constructors in Python?How do I check what version of Python is running my script?Should I put #! (shebang) in Python scripts, and what form should it take?Is this possible - Python script to fill a Google spreadsheet?Trigger python code from Google spreadsheets?Python: Write pandas dataframe to google sheets: AttributeError: 'module' object has no attribute 'open'Google Sheets query in PythonPython Google Sheets API Limit 429 Error with LoopPython - Google Sheets API - Not Writing to the Specified Range
Tiny image scraper for xkcd.com
Is it safe for a student to give negative feedback in student evaluations?
One hour 10 min layover in Newark; International -> Domestic connection. Enough time to clear customs?
How could reincarnation magic be limited to prevent overuse?
To which country did MiGs in Top Gun belong?
Sum of Infinite series with a Geometric series in multiply
Is mathematics truth?
Why would a Intel 8080 chip be destroyed if +12 V is connected before -5 V?
'Hard work never hurt anyone' Why not 'hurts'?
How does Harry wear the invisibility cloak?
How to get all months in a query where one month has no matches?
properties that real numbers hold but complex numbers does not
Why is k-means used for non normally distributed data?
Do artifacts count as creatures when they are put into a graveyard while March of the Machines is in play?
Why didn't Thatcher give Hong Kong to Taiwan?
Importance of electrolytic capacitor size
Heuristic argument for the Riemann Hypothesis
How to add some symbol (or just add newline) if the numbers in the text are not continuous
Why do we need explainable AI?
How do we know if a dialogue sounds unnatural without asking for feedback?
How can I design a magically-induced coma?
What is the most likely cause of short, quick, and useless reviews?
Initializing a std::array with a constant value
In chocolate terminology, what is the name of thinly sliced leaf-shaped toppings made from hot, smooth chocolate, used to form flower petals?
What is a good way to call a python script from a Google Sheets spreadsheet?
What is the quickest way to HTTP GET in Python?What is a clean, pythonic way to have multiple constructors in Python?How do I check what version of Python is running my script?Should I put #! (shebang) in Python scripts, and what form should it take?Is this possible - Python script to fill a Google spreadsheet?Trigger python code from Google spreadsheets?Python: Write pandas dataframe to google sheets: AttributeError: 'module' object has no attribute 'open'Google Sheets query in PythonPython Google Sheets API Limit 429 Error with LoopPython - Google Sheets API - Not Writing to the Specified Range
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I have a google spreadsheet that functions as a quote calculator. I am using python-requests and beautifulsoup to:
- Grab values from the google sheet,
- login to a supplier's website
- Access their online quote calculator
- Populate the supplier's online quote form.
- Submit the form
- Scrape their quote data from the resulting html code.
- Populate the google sheet with their cost information
I don't need help with the python code or getting the python code to modify the googlesheet.
what I can't find seemingly anywhere is a good process for calling the python code from within the google sheet.
Ideally, I'd like to have an object in the google sheet (button? link?) that will trigger the web-scraping functionality. I have seen Google Sheets scripts that claim to populate a spreadsheet with scraped data from outside webpages, but these tools don't handle any site with authentication, hence the python angle.
Any suggestions much appreciated.
Everything I've found online explains how to get a process running on GAE to call a Google App script. Nothing about going the other way around.
python google-app-engine python-requests google-sheets-api
add a comment |
I have a google spreadsheet that functions as a quote calculator. I am using python-requests and beautifulsoup to:
- Grab values from the google sheet,
- login to a supplier's website
- Access their online quote calculator
- Populate the supplier's online quote form.
- Submit the form
- Scrape their quote data from the resulting html code.
- Populate the google sheet with their cost information
I don't need help with the python code or getting the python code to modify the googlesheet.
what I can't find seemingly anywhere is a good process for calling the python code from within the google sheet.
Ideally, I'd like to have an object in the google sheet (button? link?) that will trigger the web-scraping functionality. I have seen Google Sheets scripts that claim to populate a spreadsheet with scraped data from outside webpages, but these tools don't handle any site with authentication, hence the python angle.
Any suggestions much appreciated.
Everything I've found online explains how to get a process running on GAE to call a Google App script. Nothing about going the other way around.
python google-app-engine python-requests google-sheets-api
add a comment |
I have a google spreadsheet that functions as a quote calculator. I am using python-requests and beautifulsoup to:
- Grab values from the google sheet,
- login to a supplier's website
- Access their online quote calculator
- Populate the supplier's online quote form.
- Submit the form
- Scrape their quote data from the resulting html code.
- Populate the google sheet with their cost information
I don't need help with the python code or getting the python code to modify the googlesheet.
what I can't find seemingly anywhere is a good process for calling the python code from within the google sheet.
Ideally, I'd like to have an object in the google sheet (button? link?) that will trigger the web-scraping functionality. I have seen Google Sheets scripts that claim to populate a spreadsheet with scraped data from outside webpages, but these tools don't handle any site with authentication, hence the python angle.
Any suggestions much appreciated.
Everything I've found online explains how to get a process running on GAE to call a Google App script. Nothing about going the other way around.
python google-app-engine python-requests google-sheets-api
I have a google spreadsheet that functions as a quote calculator. I am using python-requests and beautifulsoup to:
- Grab values from the google sheet,
- login to a supplier's website
- Access their online quote calculator
- Populate the supplier's online quote form.
- Submit the form
- Scrape their quote data from the resulting html code.
- Populate the google sheet with their cost information
I don't need help with the python code or getting the python code to modify the googlesheet.
what I can't find seemingly anywhere is a good process for calling the python code from within the google sheet.
Ideally, I'd like to have an object in the google sheet (button? link?) that will trigger the web-scraping functionality. I have seen Google Sheets scripts that claim to populate a spreadsheet with scraped data from outside webpages, but these tools don't handle any site with authentication, hence the python angle.
Any suggestions much appreciated.
Everything I've found online explains how to get a process running on GAE to call a Google App script. Nothing about going the other way around.
python google-app-engine python-requests google-sheets-api
python google-app-engine python-requests google-sheets-api
asked Mar 28 at 2:04
rabbitholefinderrabbitholefinder
521 silver badge8 bronze badges
521 silver badge8 bronze badges
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
Google Apps Script. You will need to use Apps Script to add a button or menu item to the sheet and then trigger your python script. You will have to make your python code accessible through some web api and call that api via Apps Script using the UrlFetch service.
We ended up using google app script triggers. In the past, authentication to external web sites was not possible. Now, it is and we abandoned using python's web scraping libraries altogether.
– rabbitholefinder
Apr 9 at 14:40
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55389127%2fwhat-is-a-good-way-to-call-a-python-script-from-a-google-sheets-spreadsheet%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Google Apps Script. You will need to use Apps Script to add a button or menu item to the sheet and then trigger your python script. You will have to make your python code accessible through some web api and call that api via Apps Script using the UrlFetch service.
We ended up using google app script triggers. In the past, authentication to external web sites was not possible. Now, it is and we abandoned using python's web scraping libraries altogether.
– rabbitholefinder
Apr 9 at 14:40
add a comment |
Google Apps Script. You will need to use Apps Script to add a button or menu item to the sheet and then trigger your python script. You will have to make your python code accessible through some web api and call that api via Apps Script using the UrlFetch service.
We ended up using google app script triggers. In the past, authentication to external web sites was not possible. Now, it is and we abandoned using python's web scraping libraries altogether.
– rabbitholefinder
Apr 9 at 14:40
add a comment |
Google Apps Script. You will need to use Apps Script to add a button or menu item to the sheet and then trigger your python script. You will have to make your python code accessible through some web api and call that api via Apps Script using the UrlFetch service.
Google Apps Script. You will need to use Apps Script to add a button or menu item to the sheet and then trigger your python script. You will have to make your python code accessible through some web api and call that api via Apps Script using the UrlFetch service.
answered Mar 28 at 3:43
ZackZack
896 bronze badges
896 bronze badges
We ended up using google app script triggers. In the past, authentication to external web sites was not possible. Now, it is and we abandoned using python's web scraping libraries altogether.
– rabbitholefinder
Apr 9 at 14:40
add a comment |
We ended up using google app script triggers. In the past, authentication to external web sites was not possible. Now, it is and we abandoned using python's web scraping libraries altogether.
– rabbitholefinder
Apr 9 at 14:40
We ended up using google app script triggers. In the past, authentication to external web sites was not possible. Now, it is and we abandoned using python's web scraping libraries altogether.
– rabbitholefinder
Apr 9 at 14:40
We ended up using google app script triggers. In the past, authentication to external web sites was not possible. Now, it is and we abandoned using python's web scraping libraries altogether.
– rabbitholefinder
Apr 9 at 14:40
add a comment |
Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.
Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55389127%2fwhat-is-a-good-way-to-call-a-python-script-from-a-google-sheets-spreadsheet%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown