mirror of
https://github.com/hnhx/librex.git
synced 2025-01-10 03:37:25 -03:00
fix rutor
This commit is contained in:
parent
b8817a6e28
commit
bb5c370205
1 changed files with 4 additions and 4 deletions
|
@ -10,20 +10,20 @@
|
|||
|
||||
foreach($xpath->query("//table/tr[@class='gai' or @class='tum']") as $result)
|
||||
{
|
||||
|
||||
$name = $xpath->evaluate(".//td/a", $result)[2]->textContent;
|
||||
$magnet = $xpath->evaluate(".//td/a/@href", $result)[1]->textContent;
|
||||
$magnet_without_tracker = explode("&tr=", $magnet)[0];
|
||||
$magnet = $magnet_without_tracker . $config->bittorent_trackers;
|
||||
$size = $xpath->evaluate(".//td", $result)[3]->textContent;
|
||||
$td = $xpath->evaluate(".//td", $result);
|
||||
$size = $td[count($td) == 5 ? 3 : 2]->textContent;
|
||||
$seeders = $xpath->evaluate(".//span", $result)[0]->textContent;
|
||||
$leechers = $xpath->evaluate(".//span", $result)[1]->textContent;
|
||||
|
||||
array_push($results,
|
||||
array (
|
||||
"name" => htmlspecialchars($name),
|
||||
"seeders" => (int) remove_special($seeders),
|
||||
"leechers" => (int) remove_special($leechers),
|
||||
"seeders" => (int) filter_var($seeders, FILTER_SANITIZE_NUMBER_INT),
|
||||
"leechers" => (int) filter_var($leechers, FILTER_SANITIZE_NUMBER_INT),
|
||||
"magnet" => htmlspecialchars($magnet),
|
||||
"size" => htmlspecialchars($size),
|
||||
"source" => "rutor.info"
|
||||
|
|
Loading…
Reference in a new issue