问题描述
我当前的Android应用程序使用WebView允许用户搜索《科学期刊》(文章).
My current Android Application uses a WebView to allow users to search for Scientific Journals (articles).
当我尝试浏览至Google Scholar时,我会收到一个屏幕,显示
When I try to browse to Google Scholar I receive a screen that says
We're Sorry... ...but your computer or network may be sending automated queries. To protect our user's we can't process your request right now.
"automated query
"是什么意思?我的webView只是尝试加载Scholar URL,为什么Google用户需要对此加以保护?
What does "automated query
" mean? My webView simply attempts to load the Scholar URL why do google users need protecting from that?
这是否意味着永远无法通过Android WebView访问Google Scholar?
Does this mean that Google Scholar can never be accessed via an Android WebView?
是否可以通过Android Webview访问Google学术搜索?
Is there any way to access Google Scholar via an Android Webview?
推荐答案
清除Web视图的缓存和cookie,然后重试.
Clear the cache and cookies for the webview and try again.
CookieSyncManager.createInstance(this);
CookieManager cookieManager = CookieManager.getInstance();
cookieManager.removeAllCookie();
对于Lollypop及以上版本:
For Lollypop and above:
removeAllCookies(ValueCallback)
注意:
QS已经用我的评论解决了这个问题,我写了这个答案来帮助那些面临此问题的人.
QS already fixed the problem with my comment, i written this answer to help some one who faces this issue.
这篇关于如何通过Android Webview访问Google Scholar的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!