From 7dc77c36d73efece554577001dfe4140c19db46e Mon Sep 17 00:00:00 2001 From: sijanec Date: Thu, 10 Jun 2021 22:46:51 +0200 Subject: gcc does not warn about misindented preprocessor statementsgit add .git add .git add .git add .! --- src/api.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/api.c') diff --git a/src/api.c b/src/api.c index 9a9bbc8..709e2e2 100644 --- a/src/api.c +++ b/src/api.c @@ -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); -- cgit v1.2.3