commit 6dd420458fbac30f4d2def9200e2f3e265360156 parent 7cd3479094e6f05a52e8ccc3c0d8ccb7a7d17563 Author: Simon Kornblith <simon@simonster.com> Date: Tue, 29 Jan 2013 17:43:30 -0500 Detect CAPTCHA Diffstat:
| M | chrome/content/zotero/recognizePDF.js | | | 3 | ++- |
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/chrome/content/zotero/recognizePDF.js b/chrome/content/zotero/recognizePDF.js @@ -488,7 +488,8 @@ Zotero_RecognizePDF.Recognizer.prototype._queryGoogle = function() { Zotero_RecognizePDF.Recognizer.prototype._scrape = function(/**Zotero.Translate*/ translate) { if(this._hiddenBrowser.contentDocument.location.href == "about:blank") return; - if(this._hiddenBrowser.contentDocument.title == "403 Forbidden") { + if(Zotero.Utilities.xpath(this._hiddenBrowser.contentDocument, "//form[@action='Captcha']").length || + this._hiddenBrowser.contentDocument.location.toString().indexOf("/sorry") !== -1) { // hit the captcha /* var forms = this._hiddenBrowser.contentDocument.getElementsByTagName("form");