Google Sheet importxml login access

让人想犯罪 __ 提交于 2021-02-05 09:41:38

问题


I've used importxml to get public info from a website. But sometimes info changed when we access though different country. For example http://www.ebay.com/itm/221998403138?_trksid=p2057872.m2749.l2649&var=520870142881

this item is not available in USA but when we'll access from different country where seller shipped or changed the country of shipping, we can find the shipping cost. If I use importxml from Google Sheet, that means the access country will be USA. How far I understand i can't change the IP of Google Sheet. So I would like to know if is there any way to sent login detail though URL. That means I want to specific Google Sheet to access URL though my login details(username and password).

So that shipping cost will appear under xpath.

//*[@id="fshippingCost"]/span[1] -- Non-US country where seller ship

//*[@id="shSummary"]/span[1] - USA, shipping is not available

Please see the image for clarification.

http://prntscr.com/ad6fqi


回答1:


IMPORTXML is a Google Sheets built-in function that use Google servers to be ran anonymously. If you need to use to sign in in order to get access to restricted access information you should use another thing like Google Apps Script to create a web app.



来源:https://stackoverflow.com/questions/35899974/google-sheet-importxml-login-access

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!