Warning: session_start(): open(/var/lib/php/sessions/sess_4c5q98iu33ec6qqqbdst5ep5fe, O_RDWR) failed: No space left on device (28) in /var/www/tb-usercake/models/config.php on line 51
Warning: session_start(): Failed to read session data: files (path: /var/lib/php/sessions) in /var/www/tb-usercake/models/config.php on line 51
lib 1002510 // jsoup
import org.jsoup.*;
import org.jsoup.nodes.*;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
static S googleImageSearch_userAgent = "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.1";
static int googleImageSearch_timeout = 10*1000;
static S googleImageSearch(S q) ctex {
ret googleImageSearch_elementURL(googleImageSearch_query(q).first());
}
static L googleImageSearch_multi(S q) ctex {
ret map(f googleImageSearch_elementURL, googleImageSearch_query(q));
}
static S googleImageSearch_elementURL(Element media) ctex {
S finUrl = media.attr("abs:data-src");
ret htmldecode(finUrl);
}
static Elements googleImageSearch_query(S q) ctex {
String googleUrl = "https://www.google.com/search?tbm=isch&q=" + urlencode(q);
Document doc1 = Jsoup.connect(googleUrl).userAgent(googleImageSearch_userAgent).timeout(googleImageSearch_timeout).get();
ret doc1.select("[data-src]");
}