Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
f568fd43
Commit
f568fd43
authored
Feb 18, 2015
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Youtube: improve description parsing
Close #13973
parent
a8ef884e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
14 deletions
+12
-14
share/lua/playlist/youtube.lua
share/lua/playlist/youtube.lua
+12
-14
No files found.
share/lua/playlist/youtube.lua
View file @
f568fd43
...
...
@@ -235,23 +235,21 @@ function parse()
name
=
vlc
.
strings
.
resolve_xml_special_chars
(
name
)
name
=
vlc
.
strings
.
resolve_xml_special_chars
(
name
)
end
if
string.match
(
line
,
"<meta name=\"
description
\
""
)
then
-- Don't ask me why they double encode ...
_
,
_
,
description
=
string.find
(
line
,
"content=\"
(.
-
)
\
""
)
description
=
vlc
.
strings
.
resolve_xml_special_chars
(
description
)
if
string.match
(
line
,
"<p id=\"
eow
[
-
]
description
\
" >"
)
then
_
,
_
,
description
=
string.find
(
line
,
"<p id=\"
eow
[
-
]
description
\
" >(.-)<[/]p>"
)
description
=
vlc
.
strings
.
resolve_xml_special_chars
(
description
)
end
if
string.match
(
line
,
"<meta property=\"
og
:
image
\
""
)
then
_
,
_
,
arturl
=
string.find
(
line
,
"content=\"
(.
-
)
\
""
)
end
-- This is not available in the video parameters (whereas it
-- is given by the get_video_info API as the "author" field)
if
not
artist
then
artist
=
string.match
(
line
,
"yt%-uix%-sessionlink yt%-user%-name[^>]*>([^<]*)</"
)
if
artist
then
artist
=
vlc
.
strings
.
resolve_xml_special_chars
(
artist
)
end
if
string.match
(
line
,
"
\"
author\"
:
\
"(.-)\"
,
") then
_,_,artist = string.find(line, "
\
"author\"
:
\
"(.-)\"
,
")
end
-- JSON parameters, also formerly known as "
swfConfig
",
-- "
SWF_ARGS
", "
swfArgs
", "
PLAYER_CONFIG
", "
playerConfig
" ...
if string.match( line, "
ytplayer
%
.
config
" ) then
...
...
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