Commit 29a6022f authored by Dominik Hebeler's avatar Dominik Hebeler

Datenschutzerklärung erweitert und einige Formatierungen durchgeführt

parent 764b5d00
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -7,55 +7,50 @@ use Symfony\Component\DomCrawler\Crawler;
class Allesklar extends Searchengine
{
protected $tds = "";
function __construct (\SimpleXMLElement $engine, \App\MetaGer $metager)
{
parent::__construct($engine, $metager);
}
public function loadResults ($result)
{
$crawler = new Crawler(utf8_decode($result));
$crawler = $crawler
->filter('table[width=585]')
->reduce(function(Crawler $node, $i) {
if($i < 5)
{
return false;
}
});
$this->counter = 0;
$crawler->filter('table')->each(function (Crawler $node, $i)
{
try {
$this->string = "";
$titleTag = $node->filter('tr > td > a')->first();
$title = trim($titleTag->filter('a')->text());
$link = $titleTag->filter('a')->attr('href');
if($i === 0)
{
$descr = trim($node->filter('tr > td.bodytext')->eq(3)->text());
}else
{
$descr = trim($node->filter('tr > td.bodytext')->eq(2)->text());
}
$this->counter++;
$this->results[] = new \App\Models\Result(
$this->engine,
$title,
$link,
$link,
$descr,
$this->gefVon,
$this->counter
);
} catch (\InvalidArgumentException $e)
{
}
});
}
}
\ No newline at end of file
protected $tds = "";
public function __construct(\SimpleXMLElement $engine, \App\MetaGer $metager)
{
parent::__construct($engine, $metager);
}
public function loadResults($result)
{
$crawler = new Crawler(utf8_decode($result));
$crawler = $crawler
->filter('table[width=585]')
->reduce(function (Crawler $node, $i) {
if ($i < 5) {
return false;
}
});
$this->counter = 0;
$crawler->filter('table')->each(function (Crawler $node, $i) {
try {
$this->string = "";
$titleTag = $node->filter('tr > td > a')->first();
$title = trim($titleTag->filter('a')->text());
$link = $titleTag->filter('a')->attr('href');
if ($i === 0) {
$descr = trim($node->filter('tr > td.bodytext')->eq(3)->text());
} else {
$descr = trim($node->filter('tr > td.bodytext')->eq(2)->text());
}
$this->counter++;
$this->results[] = new \App\Models\Result(
$this->engine,
$title,
$link,
$link,
$descr,
$this->gefVon,
$this->counter
);
} catch (\InvalidArgumentException $e) {
}
});
}
}
<?php
namespace app\Models\parserSkripte;
use App\Models\Searchengine;
class BASE extends Searchengine
class BASE extends Searchengine
{
public $results = [];
public $results = [];
public function __construct(\SimpleXMLElement $engine, \App\MetaGer $metager)
{
parent::__construct($engine, $metager);
}
function __construct (\SimpleXMLElement $engine,\App\MetaGer $metager)
{
parent::__construct($engine, $metager);
}
public function loadResults($result)
{
public function loadResults ($result)
{
$title = "";
$link = "";
$anzeigeLink = $link;
$descr = "";
$title = "";
$link = "";
$anzeigeLink = $link;
$descr = "";
/*$this->counter++;
$this->results[] = new \App\Models\Result(
$title,
$link,
$anzeigeLink,
$descr,
$this->gefVon,
$this->counter
);*/
}
}
\ No newline at end of file
/*$this->counter++;
$this->results[] = new \App\Models\Result(
$title,
$link,
$anzeigeLink,
$descr,
$this->gefVon,
$this->counter
);*/
}
}
<?php
namespace app\Models\parserSkripte;
use App\Models\Searchengine;
class Beammachine extends Searchengine
class Beammachine extends Searchengine
{
public $results = [];
function __construct (\SimpleXMLElement $engine, \App\MetaGer $metager)
{
parent::__construct($engine, $metager);
}
public function loadResults ($result)
{
$results = trim($result);
foreach( explode("\n", $results) as $result )
{
$res = explode("|", $result);
if(sizeof($res) < 3)
{
continue;
}
$title = $res[0];
$link = $res[1];
$anzeigeLink = $link;
$descr = $res[2];
$this->counter++;
$this->results[] = new \App\Models\Result(
$this->engine,
$title,
$link,
$anzeigeLink,
$descr,
$this->gefVon,
$this->counter
);
}
}
public $results = [];
public function __construct(\SimpleXMLElement $engine, \App\MetaGer $metager)
{
parent::__construct($engine, $metager);
}
public function loadResults($result)
{
$results = trim($result);
foreach (explode("\n", $results) as $result) {
$res = explode("|", $result);
if (sizeof($res) < 3) {
continue;
}
$title = $res[0];
$link = $res[1];
$anzeigeLink = $link;
$descr = $res[2];
$this->counter++;
$this->results[] = new \App\Models\Result(
$this->engine,
$title,
$link,
$anzeigeLink,
$descr,
$this->gefVon,
$this->counter
);
}
}
}
<?php
namespace app\Models\parserSkripte;
use App\Models\Searchengine;
use Symfony\Component\DomCrawler\Crawler;
class Bing extends Searchengine
class Bing extends Searchengine
{
public $results = [];
function __construct (\SimpleXMLElement $engine, \App\MetaGer $metager)
{
parent::__construct($engine, $metager);
}
public function loadResults ($result)
{
try
{
$crawler = new Crawler($result);
$crawler->filter('ol#b_results > li.b_algo')->each(function (Crawler $node, $i)
{
$title = $node->filter('li h2 > a')->text();
$link = $node->filter('li h2 > a')->attr('href');
$anzeigeLink = $link;
$descr = $node->filter('li div > p')->text();
$this->counter++;
$this->results[] = new \App\Models\Result(
$this->engine,
$title,
$link,
$anzeigeLink,
$descr,
$this->gefVon,
$this->counter
);
} );
} catch ( \ErrorException $e)
{
return;
}
}
}
\ No newline at end of file
public $results = [];
public function __construct(\SimpleXMLElement $engine, \App\MetaGer $metager)
{
parent::__construct($engine, $metager);
}
public function loadResults($result)
{
try
{
$crawler = new Crawler($result);
$crawler->filter('ol#b_results > li.b_algo')->each(function (Crawler $node, $i) {
$title = $node->filter('li h2 > a')->text();
$link = $node->filter('li h2 > a')->attr('href');
$anzeigeLink = $link;
$descr = $node->filter('li div > p')->text();
$this->counter++;
$this->results[] = new \App\Models\Result(
$this->engine,
$title,
$link,
$anzeigeLink,
$descr,
$this->gefVon,
$this->counter
);
});
} catch (\ErrorException $e) {
return;
}
}
}
<?php
namespace app\Models\parserSkripte;
use App\Models\Searchengine;
use Symfony\Component\DomCrawler\Crawler;
class Bing_bilder extends Searchengine
class Bing_bilder extends Searchengine
{
public $results = [];
public $results = [];
public function __construct(\SimpleXMLElement $engine, \App\MetaGer $metager)
{
parent::__construct($engine, $metager);
}
function __construct (\SimpleXMLElement $engine, \App\MetaGer $metager)
{
parent::__construct($engine, $metager);
}
public function loadResults($result)
{
$crawler = new Crawler($result);
$crawler->filter('div#b_content div.item')->each(function (Crawler $node, $i) {
$title = $node->filter('div.meta > a.tit')->text();
$link = $node->filter('div.meta > a.tit')->attr("href");
$anzeigeLink = $link;
$descr = $node->filter('div.meta > div.des')->text();
$image = $node->filter('a.thumb img')->attr("src");
public function loadResults ($result)
{
$crawler = new Crawler($result);
$crawler->filter('div#b_content div.item')->each(function (Crawler $node, $i)
{
$title = $node->filter('div.meta > a.tit')->text();
$link = $node->filter('div.meta > a.tit')->attr("href");
$anzeigeLink = $link;
$descr = $node->filter('div.meta > div.des')->text();
$image = $node->filter('a.thumb img')->attr("src");
$this->counter++;
$this->results[] = new \App\Models\Result(
$this->engine,
$title,
$link,
$anzeigeLink,
$descr,
$this->gefVon,
$this->counter,
false,
$image
);
});
$this->counter++;
$this->results[] = new \App\Models\Result(
$this->engine,
$title,
$link,
$anzeigeLink,
$descr,
$this->gefVon,
$this->counter,
false,
$image
);
} );
}
}
\ No newline at end of file
}
}
<?php
namespace app\Models\parserSkripte;
use App\Models\Searchengine;
use Symfony\Component\DomCrawler\Crawler;
class Dart extends Searchengine
class Dart extends Searchengine
{
public $results = [];
function __construct (\SimpleXMLElement $engine, \App\MetaGer $metager)
{
parent::__construct($engine, $metager);
}
public function loadResults ($result)
{
$crawler = new Crawler($result);
$crawler->filter('table#search-results > tr > td')->each(function (Crawler $node, $i)
{
$i = $i - ( 6 * $this->counter);
if($i === 0)
return;
if($i === 1)
{
$this->description = $node->text();
$this->link = "http://www.dart-europe.eu/" . $node->filter('a')->attr('href');
}
if($i === 2)
$this->title = $node->text();
if($i === 3)
$this->title .= " (" . $node->text() . ")";
if($i === 4)
$this->title .= " " . $node->text();
if($i === 5)
{
$this->title .= "|" . $node->text();
$title = $this->title;
$this->title = "";
$link = $this->link;
$this->link = "";
$anzeigeLink = $link;
$descr = $this->description;
$this->description = "";
$this->counter++;
$this->results[] = new \App\Models\Result(
$this->engine,
$title,
$link,
$anzeigeLink,
$descr,
$this->gefVon,
$this->counter
);
}
} );
}
public $results = [];
public function __construct(\SimpleXMLElement $engine, \App\MetaGer $metager)
{
parent::__construct($engine, $metager);
}
public function loadResults($result)
{
$crawler = new Crawler($result);
$crawler->filter('table#search-results > tr > td')->each(function (Crawler $node, $i) {
$i = $i - (6 * $this->counter);
if ($i === 0) {
return;
}
if ($i === 1) {
$this->description = $node->text();
$this->link = "http://www.dart-europe.eu/" . $node->filter('a')->attr('href');
}
if ($i === 2) {
$this->title = $node->text();
}
if ($i === 3) {
$this->title .= " (" . $node->text() . ")";
}
if ($i === 4) {
$this->title .= " " . $node->text();
}
if ($i === 5) {
$this->title .= "|" . $node->text();
$title = $this->title;
$this->title = "";
$link = $this->link;
$this->link = "";
$anzeigeLink = $link;
$descr = $this->description;
$this->description = "";
$this->counter++;
$this->results[] = new \App\Models\Result(
$this->engine,
$title,
$link,
$anzeigeLink,
$descr,
$this->gefVon,
$this->counter
);
}
});
}
}
<?php
namespace app\Models\parserSkripte;
use App\Models\Searchengine;
class Dmoznebel extends Searchengine
class Dmoznebel extends Searchengine
{
public $results = [];
function __construct (\SimpleXMLElement $engine, \App\MetaGer $metager)
{
parent::__construct($engine, $metager);
}
public function loadResults ($result)
{
$result = mb_convert_encoding($result, "UTF-8", "ISO-8859-1");
$results = trim($result);
foreach( explode("\n", $results) as $result )
{
$res = explode("|", $result);
if(sizeof($res) < 3)
{
continue;
}
$title = $res[1];
$link = $res[2];
$anzeigeLink = $link;
$descr = $res[3];
$this->counter++;
$this->results[] = new \App\Models\Result(
$this->engine,
$title,
$link,
$anzeigeLink,
$descr,
$this->gefVon,
$this->counter
);
}
}
}
\ No newline at end of file
public $results = [];
public function __construct(\SimpleXMLElement $engine, \App\MetaGer $metager)
{
parent::__construct($engine, $metager);
}
public function loadResults($result)
{
$result = mb_convert_encoding($result, "UTF-8", "ISO-8859-1");
$results = trim($result);
foreach (explode("\n", $results) as $result) {
$res = explode("|", $result);
if (sizeof($res) < 3) {
continue;
}
$title = $res[1];
$link = $res[2];
$anzeigeLink = $link;
$descr = $res[3];
$this->counter++;
$this->results[] = new \App\Models\Result(
$this->engine,
$title,
$link,
$anzeigeLink,
$descr,
$this->gefVon,
$this->counter
);
}
}
}
<?php
namespace app\Models\parserSkripte;
use App\Models\Searchengine;
class Dmoznebel_int extends Searchengine
class Dmoznebel_int extends Searchengine
{
public $results = [];
public $results = [];
public function __construct(\SimpleXMLElement $engine, \App\MetaGer $metager)
{
parent::__construct($engine, $metager);
}
function __construct (\SimpleXMLElement $engine, \App\MetaGer $metager)
{
parent::__construct($engine, $metager);
}
public function loadResults($result)
{
public function loadResults ($result)
{
$title = "";
$link = "";
$anzeigeLink = $link;
$descr = "";
$title = "";
$link = "";
$anzeigeLink = $link;
$descr = "";
$this->counter++;
$this->results[] = new \App\Models\Result(
$this->engine,
$title,
$link,
$anzeigeLink,
$descr,
$this->gefVon,
$this->counter
);
}
}
\ No newline at end of file
$this->counter++;
$this->results[] = new \App\Models\Result(
$this->engine,
$title,
$link,
$anzeigeLink,
$descr,
$this->gefVon,
$this->counter
);
}
}
<?php
namespace app\Models\parserSkripte;
use App\Models\Searchengine;
use DateTimeZone;
use DateTime;
class Ebay extends Searchengine
class Ebay extends Searchengine
{
public $results = [];
public $results = [];