Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
MetaGer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
open-source
MetaGer
Commits
007ac73c
Commit
007ac73c
authored
8 years ago
by
Karl Hasselbring
Browse files
Options
Downloads
Plain Diff
Merge branch '137-mediathekensuche-fernsehsuche-de' into 'development'
Die Fernsehsuche ist jetzt unter Nachrichten eingebaut. Closes
#137
See merge request
!264
parents
3f8e726b
84d24f8e
No related branches found
Branches containing commit
No related tags found
2 merge requests
!265
Development
,
!264
Die Fernsehsuche ist jetzt unter Nachrichten eingebaut.
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
app/Models/parserSkripte/Fernsehsuche.php
+51
-0
51 additions, 0 deletions
app/Models/parserSkripte/Fernsehsuche.php
with
51 additions
and
0 deletions
app/Models/parserSkripte/Fernsehsuche.php
0 → 100644
+
51
−
0
View file @
007ac73c
<?php
namespace
app\Models\parserSkripte
;
use
App\Models\Searchengine
;
class
Fernsehsuche
extends
Searchengine
{
public
$results
=
[];
function
__construct
(
\SimpleXMLElement
$engine
,
\App\MetaGer
$metager
)
{
parent
::
__construct
(
$engine
,
$metager
);
}
public
function
loadResults
(
$result
)
{
$result
=
preg_replace
(
"/
\r\n
/si"
,
""
,
$result
);
try
{
$content
=
json_decode
(
$result
);
}
catch
(
\Exception
$e
)
{
abort
(
500
,
"
$result
is not a valid xml string"
);
}
if
(
!
$content
)
{
return
;
}
$results
=
$content
->
response
->
docs
;
foreach
(
$results
as
$result
)
{
$title
=
$result
->
show
.
" : "
.
$result
->
title
;
$link
=
urldecode
(
$result
->
url
);
$anzeigeLink
=
$link
;
#$result->stream_url_q1;die("hu");
$descr
=
$result
->
description
;
$image
=
"http://api-resources.fernsehsuche.de"
.
$result
->
thumbnail
;
$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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment