mirror of
https://git.bakhai.co.in/FbIN/4Get.git
synced 2025-11-05 04:21:31 +05:30
Synced
bypass mojeek bot check (7ac53c6e11) fix broken mojeek instant answer image (ad535a1609)
This commit is contained in:
parent
f6054b1683
commit
145c1e1388
1 changed files with 9 additions and 8 deletions
|
|
@ -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,17 +692,18 @@ class mojeek{
|
|||
preg_match(
|
||||
'/\/image\?img=([^&]+)/i',
|
||||
$thumb[0]["attributes"]["src"],
|
||||
$thumb
|
||||
$matches
|
||||
);
|
||||
|
||||
if(count($thumb) === 2){
|
||||
if(count($matches) === 2){
|
||||
|
||||
// for some reason, if we dont get the image from mojeek
|
||||
// it sometimes fail to fetch the right image URL
|
||||
$answer["thumb"] =
|
||||
urldecode(
|
||||
"https://mojeek.com" .
|
||||
$this->fuckhtml
|
||||
->getTextContent(
|
||||
$thumb[1]
|
||||
)
|
||||
$thumb[0]["attributes"]["src"]
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue