mirror of
https://github.com/serega404/VodokanalBot.git
synced 2025-04-21 06:20:46 +03:00
Bug fix
This commit is contained in:
parent
766356b3bb
commit
888b663520
@ -17,7 +17,7 @@ if (file_exists("db.json")) {
|
|||||||
// get DOM from URL
|
// get DOM from URL
|
||||||
$html = file_get_html($config['url']);
|
$html = file_get_html($config['url']);
|
||||||
|
|
||||||
$all_elements;
|
$all_elements = null;
|
||||||
|
|
||||||
$dateNow = date("d.m.Y");
|
$dateNow = date("d.m.Y");
|
||||||
echo "Date now: " . $dateNow . "\n";
|
echo "Date now: " . $dateNow . "\n";
|
||||||
@ -36,6 +36,11 @@ foreach ($html->find('td[bgcolor="#ffffff"]') as $e) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($all_elements == null) {
|
||||||
|
echo "Posts not dound";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
echo "The number of posts for this day: " . count($all_elements) . "\n";
|
echo "The number of posts for this day: " . count($all_elements) . "\n";
|
||||||
|
|
||||||
if ($db != null) {
|
if ($db != null) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user