forked from lolcat/4get
google web, videos and news, various other fixes
This commit is contained in:
@@ -857,7 +857,9 @@ class brave{
|
||||
// parse ratings
|
||||
if(
|
||||
isset($info["ratings"]) &&
|
||||
$info["ratings"] != "void 0"
|
||||
$info["ratings"] != "void 0" &&
|
||||
is_array($info["ratings"]) &&
|
||||
count($info["ratings"]) !== 0
|
||||
){
|
||||
|
||||
$description[] = [
|
||||
@@ -1183,7 +1185,7 @@ class brave{
|
||||
"title" => $news["title"],
|
||||
"author" => null,
|
||||
"description" => $news["description"],
|
||||
"date" => !isset($news["age"]) || $news["age"] == "void 0" ? null : strtotime($news["age"]),
|
||||
"date" => !isset($news["age"]) || $news["age"] == "void 0" || $news["age"] == "null" ? null : strtotime($news["age"]),
|
||||
"thumb" => $thumb,
|
||||
"url" => $news["url"]
|
||||
];
|
||||
|
@@ -545,8 +545,6 @@ class ddg{
|
||||
|
||||
public function web($get){
|
||||
|
||||
$proxy = null;
|
||||
|
||||
if($get["npt"]){
|
||||
|
||||
[$jsgrep, $proxy] = $this->backend->get($get["npt"], "web");
|
||||
|
3815
scraper/google.php
3815
scraper/google.php
File diff suppressed because it is too large
Load Diff
@@ -608,7 +608,7 @@ class mojeek{
|
||||
$this->fuckhtml
|
||||
->getTextContent(
|
||||
$this->fuckhtml
|
||||
->getElementsByClassName("i", "p")[1]
|
||||
->getElementsByClassName("i", "p")[0]
|
||||
)
|
||||
);
|
||||
|
||||
|
@@ -229,7 +229,7 @@ class sc{
|
||||
|
||||
if($json === null){
|
||||
|
||||
throw new Exception("Failed to decode JSON");
|
||||
throw new Exception("Failed to decode JSON. Did the keys set in data/config.php expire?");
|
||||
}
|
||||
|
||||
$out = [
|
||||
|
Reference in New Issue
Block a user