diff options
Diffstat (limited to '')
-rw-r--r-- | src/api.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -174,6 +174,7 @@ struct sc_query * sc_query_google (const char * s, struct sc_cache * c, struct s rs = -2; goto rc; } + /* TODO: check if response is asking for a captcha */ if (opt & SC_OPT_IMAGE) { imageclass = sc_find_class(txtdoc, "{font-family:Roboto,Helvetica,Arial,sans-serif}"); if (!imageclass) { @@ -185,7 +186,7 @@ struct sc_query * sc_query_google (const char * s, struct sc_cache * c, struct s titleclass = sc_find_class(txtdoc, "{color:#1967D2;font-size:14px;line-height:16px}"); descclass = sc_find_class(txtdoc, "{word-break:break-word}"); if (!titleclass || !descclass) { - SC_LOG(SC_LOG_ERROR, c, "!titleclass || !descclass"); + SC_LOG(SC_LOG_ERROR, c, "!titleclass || !descclass, txtdoc = %s", txtdoc); rs = -4; goto rc; } @@ -218,7 +219,7 @@ struct sc_query * sc_query_google (const char * s, struct sc_cache * c, struct s SC_LOG(SC_LOG_DEBUG, c, "hreflink = %s", hreflink); sscanf(hreflink, "/imgres?imgurl=%m[^&]&imgrefurl=%m[^&]", &imgurl, &imgrefurl); if (!imgurl && !imgrefurl) { - SC_LOG(SC_LOG_ERROR, c, "!imgurl && !imgrefurl"); + SC_LOG(SC_LOG_ERROR, c, "!imgurl && !imgrefurl, txtdoc = %s", txtdoc); /* rs = -6; */ /* we continue running not fail because of a single picture */ free(imgurl); free(imgrefurl); |