Compare commits

..

No commits in common. "ad535a16092b765c996858c3fbcdf726df5a0502" and "f33f02e816cfdd2b717973772ece4df4b98ea9bb" have entirely different histories.

View File

@ -457,7 +457,7 @@ class mojeek{
"tn" => 7, // number of news results/page
"date" => 1, // show date
"tlen" => 128, // max length of title
//"dlen" => 511, // max length of description
"dlen" => 511, // max length of description
"arc" => ($country == "any" ? "none" : $country) // location. don't use autodetect!
];
@ -692,18 +692,17 @@ class mojeek{
preg_match(
'/\/image\?img=([^&]+)/i',
$thumb[0]["attributes"]["src"],
$matches
$thumb
);
if(count($matches) === 2){
if(count($thumb) === 2){
// for some reason, if we dont get the image from mojeek
// it sometimes fail to fetch the right image URL
$answer["thumb"] =
"https://mojeek.com" .
$this->fuckhtml
->getTextContent(
$thumb[0]["attributes"]["src"]
urldecode(
$this->fuckhtml
->getTextContent(
$thumb[1]
)
);
}
}