Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
2fe62d40
Commit
2fe62d40
authored
Nov 18, 2013
by
Pierre Ynard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dailymotion.lua: fix page parsing
parent
dbdf09a8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
share/lua/playlist/dailymotion.lua
share/lua/playlist/dailymotion.lua
+4
-4
No files found.
share/lua/playlist/dailymotion.lua
View file @
2fe62d40
...
@@ -35,8 +35,7 @@ end
...
@@ -35,8 +35,7 @@ end
-- Probe function.
-- Probe function.
function
probe
()
function
probe
()
return
vlc
.
access
==
"http"
return
vlc
.
access
==
"http"
and
string.match
(
vlc
.
path
,
"dailymotion."
)
and
string.match
(
vlc
.
path
,
"www.dailymotion.com/video"
)
and
string.match
(
vlc
.
peek
(
2048
),
"<!DOCTYPE.*video_type"
)
end
end
function
find
(
haystack
,
needle
)
function
find
(
haystack
,
needle
)
...
@@ -53,7 +52,7 @@ function parse()
...
@@ -53,7 +52,7 @@ function parse()
if
not
line
then
if
not
line
then
break
break
end
end
if
string.match
(
line
,
"
\"
sequence\"
")
if
string.match
(
line
,
"
sequence=
"
)
then
then
line
=
vlc
.
strings
.
decode_uri
(
line
):
gsub
(
"
\\
/"
,
"/"
)
line
=
vlc
.
strings
.
decode_uri
(
line
):
gsub
(
"
\\
/"
,
"/"
)
...
@@ -67,9 +66,10 @@ function parse()
...
@@ -67,9 +66,10 @@ function parse()
description
=
string.gsub
(
description
,
"+"
,
" "
)
description
=
string.gsub
(
description
,
"+"
,
" "
)
end
end
for
_
,
param
in
ipairs
({
"hd1080URL"
,
"hd720URL"
,
"hqURL"
,
"sdURL"
})
do
for
_
,
param
in
ipairs
({
"hd1080URL"
,
"hd720URL"
,
"hqURL"
,
"sdURL"
,
"video_url"
})
do
path
=
string.match
(
line
,
"
\"
"
..
param
..
"
\"
:\"
([
^
\
"]*)\"" )
path
=
string.match
(
line
,
"
\"
"
..
param
..
"
\"
:\"
([
^
\
"]*)\"" )
if path then
if path then
path = vlc.strings.decode_uri(path)
if prefres < 0 then
if prefres < 0 then
break
break
end
end
...
...
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