mirror of
https://github.com/hnhx/librex.git
synced 2025-01-10 03:37:25 -03:00
commit
227ff16e67
2 changed files with 15 additions and 6 deletions
|
@ -1,7 +1,7 @@
|
||||||
version: "2.1"
|
version: "2.1"
|
||||||
services:
|
services:
|
||||||
librex:
|
librex:
|
||||||
image: librex:latest
|
image: librex/librex:latest
|
||||||
container_name: librex
|
container_name: librex
|
||||||
network_mode: bridge
|
network_mode: bridge
|
||||||
ports:
|
ports:
|
||||||
|
|
|
@ -9,11 +9,21 @@
|
||||||
|
|
||||||
foreach($xpath->query("//tbody/tr") as $result)
|
foreach($xpath->query("//tbody/tr") as $result)
|
||||||
{
|
{
|
||||||
$name = $xpath->evaluate(".//td[@colspan='2']//a[not(contains(@class, 'comments'))]/@title", $result)[0]->textContent;
|
$name_node = $xpath->evaluate(".//td[@colspan='2']//a[not(contains(@class, 'comments'))]/@title", $result);
|
||||||
|
if ($name_node->length > 0) {
|
||||||
|
$name = $name_node[0]->textContent;
|
||||||
|
} else {
|
||||||
|
$name = "";
|
||||||
|
}
|
||||||
$centered = $xpath->evaluate(".//td[@class='text-center']", $result);
|
$centered = $xpath->evaluate(".//td[@class='text-center']", $result);
|
||||||
$magnet = $xpath->evaluate(".//a[2]/@href", $centered[0])[0]->textContent;
|
$magnet_node = $xpath->evaluate(".//a[2]/@href", $centered[0]);
|
||||||
|
if ($magnet_node->length > 0) {
|
||||||
|
$magnet = $magnet_node[0]->textContent;
|
||||||
$magnet_without_tracker = explode("&tr=", $magnet)[0];
|
$magnet_without_tracker = explode("&tr=", $magnet)[0];
|
||||||
$magnet = $magnet_without_tracker . $config->bittorent_trackers;
|
$magnet = $magnet_without_tracker . $config->bittorent_trackers;
|
||||||
|
} else {
|
||||||
|
$magnet = "";
|
||||||
|
}
|
||||||
$size = $centered[1]->textContent;
|
$size = $centered[1]->textContent;
|
||||||
$seeders = $centered[3]->textContent;
|
$seeders = $centered[3]->textContent;
|
||||||
$leechers = $centered[4]->textContent;
|
$leechers = $centered[4]->textContent;
|
||||||
|
@ -29,7 +39,6 @@
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $results;
|
return $results;
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
Loading…
Reference in a new issue