diff options
Diffstat (limited to 'src/api.c')
-rw-r--r-- | src/api.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -153,6 +153,8 @@ enum sc_return sc_query_google (const char * s, /* breaking change: changed retu char * descclass = NULL; char * titleclass = NULL; char * imageclass = NULL; + char * resultsforclass = NULL; + char * xpathsugg = NULL; htmlDocPtr xmldoc = NULL; char * txtdoc = NULL; int qwasgiven = 0; @@ -182,7 +184,7 @@ enum sc_return sc_query_google (const char * s, /* breaking change: changed retu rs = SC_CAPTCHA; goto rc; } - char * resultsforclass = sc_find_class(txtdoc, "{color:#1967d2}"); + resultsforclass = sc_find_class(txtdoc, "{color:#1967d2}"); if (opt & SC_OPT_IMAGE) { imageclass = sc_find_class(txtdoc, "{font-family:Roboto,Helvetica,Arial,sans-serif}"); if (!imageclass) { @@ -299,7 +301,6 @@ enum sc_return sc_query_google (const char * s, /* breaking change: changed retu } q->string = realloc(q->string, sl+1); strcpy(q->string, s); - char * xpathsugg = NULL; if (resultsforclass) { xpathsugg = malloc(512+strlen(resultsforclass)); sprintf(xpathsugg, "//a[contains(@class, '%s')]", resultsforclass); |