Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
open-source
MetaGer
Commits
0fe9e5eb
Commit
0fe9e5eb
authored
Jun 27, 2017
by
Karl Hasselbring
Browse files
Added Date to additional information of minisucher and opencrawl politik results
parent
b7d643bd
Changes
2
Hide whitespace changes
Inline
Side-by-side
app/Models/parserSkripte/Minisucher.php
View file @
0fe9e5eb
...
...
@@ -42,6 +42,15 @@ class Minisucher extends Searchengine
$descr
.
=
$description
->
__toString
();
}
$descr
=
strip_tags
(
$descr
);
$dateString
=
$result
->
xpath
(
'//doc/date[@name="documentDate"]'
)[
0
]
->
__toString
();
$date
=
date_create_from_format
(
"Y-m-d\TH:i:s\Z"
,
$dateString
);
$dateVal
=
$date
->
getTimestamp
();
$additionalInformation
=
[
'date'
=>
$dateVal
];
$provider
=
$result
->
xpath
(
'//doc/str[@name="subcollection"]'
)[
0
]
->
__toString
();
if
(
isset
(
$providerCounter
[
$provider
])
&&
$providerCounter
[
$provider
]
>
10
)
{
...
...
@@ -67,7 +76,8 @@ class Minisucher extends Searchengine
$link
,
$descr
,
$gefVon
,
$counter
$counter
,
$additionalInformation
);
}
catch
(
\
ErrorException
$e
)
{
continue
;
...
...
app/Models/parserSkripte/Opencrawlpolitik.php
View file @
0fe9e5eb
...
...
@@ -3,6 +3,7 @@
namespace
app\Models\parserSkripte
;
use
App\Models\Searchengine
;
use
Log
;
class
Opencrawlpolitik
extends
Searchengine
{
...
...
@@ -29,6 +30,14 @@ class Opencrawlpolitik extends Searchengine
break
;
}
$dateString
=
$result
->
{
"opencrawlDate"
}
->
__toString
();
$date
=
date_create_from_format
(
"Ymd-Hi"
,
$dateString
);
$dateVal
=
$date
->
getTimestamp
();
$additionalInformation
=
[
'date'
=>
$dateVal
];
$title
=
$result
->
{
"title"
}
->
__toString
();
$link
=
$result
->
{
"link"
}
->
__toString
();
$anzeigeLink
=
$link
;
...
...
@@ -41,7 +50,8 @@ class Opencrawlpolitik extends Searchengine
$anzeigeLink
,
$descr
,
$this
->
gefVon
,
$this
->
counter
$this
->
counter
,
$additionalInformation
);
$count
++
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment