From 53b31c6ea98363871c7c6bdb8e662ad825e3f47a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anton=20Luka=20=C5=A0ijanec?= Date: Fri, 2 Feb 2024 12:49:38 +0100 Subject: poprbot --- prog/sear.php/index.php | 46 +- skripti/poprbot.py | 77 + "\305\241ola/ana1/kolokvij2.lyx" | 658 + "\305\241ola/ds1/izpit.lyx" | 1911 +++ "\305\241ola/p1/u\304\215enje/Druga.java" | 22 + "\305\241ola/p1/wordle/Stroj.java" | 31 + "\305\241ola/p1/wordle/Tekm_12345678.java" | 141 + "\305\241ola/p1/wordle/Tekm_63230317.java" | 217 + .../p1/wordle/Tekm_63230317_goljufija_SEME.java" | 28 + .../p1/wordle/Tekm_63230317_goljufija_SLOVAR.java" | 14 + .../p1/wordle/Tekm_63230317_goljufija_STDOUT.java" | 13 + "\305\241ola/p1/wordle/TestSkupno.java" | 136 + "\305\241ola/p1/wordle/TestirajEno.java" | 103 + "\305\241ola/p1/wordle/TestirajVse.java" | 112 + "\305\241ola/p1/wordle/demo_goljufije.txt" | 20 + "\305\241ola/p1/wordle/highlight.css" | 24 + "\305\241ola/p1/wordle/posvetilo.txt" | 72 + .../p1/wordle/rezultat_12345678_12345.txt" | 15966 +++++++++++++++++++ "\305\241ola/p1/wordle/slovar.txt" | 15964 ++++++++++++++++++ 19 files changed, 35544 insertions(+), 11 deletions(-) create mode 100755 skripti/poprbot.py create mode 100644 "\305\241ola/ds1/izpit.lyx" create mode 100644 "\305\241ola/p1/u\304\215enje/Druga.java" create mode 100644 "\305\241ola/p1/wordle/Stroj.java" create mode 100644 "\305\241ola/p1/wordle/Tekm_12345678.java" create mode 100644 "\305\241ola/p1/wordle/Tekm_63230317.java" create mode 100644 "\305\241ola/p1/wordle/Tekm_63230317_goljufija_SEME.java" create mode 100644 "\305\241ola/p1/wordle/Tekm_63230317_goljufija_SLOVAR.java" create mode 100644 "\305\241ola/p1/wordle/Tekm_63230317_goljufija_STDOUT.java" create mode 100644 "\305\241ola/p1/wordle/TestSkupno.java" create mode 100644 "\305\241ola/p1/wordle/TestirajEno.java" create mode 100644 "\305\241ola/p1/wordle/TestirajVse.java" create mode 100644 "\305\241ola/p1/wordle/demo_goljufije.txt" create mode 100644 "\305\241ola/p1/wordle/highlight.css" create mode 100644 "\305\241ola/p1/wordle/posvetilo.txt" create mode 100644 "\305\241ola/p1/wordle/rezultat_12345678_12345.txt" create mode 100644 "\305\241ola/p1/wordle/slovar.txt" diff --git a/prog/sear.php/index.php b/prog/sear.php/index.php index 4324fba..1f90c9c 100644 --- a/prog/sear.php/index.php +++ b/prog/sear.php/index.php @@ -93,11 +93,14 @@ function query_google ($s, $image = false, $noredirect = false, $bindstring = fa $breadcrumbs = $span->nodeValue; } $table = $a->parentNode->parentNode->getElementsByTagName("table")[0]; - $description = "nisem uspel izluščiti opisa."; + $description = false; if ($table) foreach ($table->getElementsByTagName("span") as $span) if ($span->getAttribute("class") == $descclass) - $description = $span->nodeValue; + if (!$description) + $description = $span->nodeValue; + if (!$description) + $description = "ni mi uspelo izluščiti opisa"; $results[] = ["url" => $hreflink, "title" => $firstspan->nodeValue, "breadcrumbs" => $breadcrumbs, "description" => $description]; } $suggested = []; @@ -113,7 +116,7 @@ function query_google ($s, $image = false, $noredirect = false, $bindstring = fa $suggestion = $suggested[0]; return ["status" => true, "query" => $s, "suggestion" => $suggestion, "results" => $results, "url" => $url]; } -function template ($title, $queryinfo, $body, $query = "", $additionalform = "", $imgfirst = false) { +function template ($title, $queryinfo, $body, $query = "", $additionalform = "", $imgfirst = false, $add_footer = "") { $query = htmlspecialchars($query); $title = htmlspecialchars($title); $buttons = " @@ -151,9 +154,10 @@ function template ($title, $queryinfo, $body, $query = "", $additionalform = "", $body

- sear.php - + sear.php +

+ $add_footer