Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Laura i Domiś
haruhi-dl
Commits
d464b291
Commit
d464b291
authored
Sep 06, 2021
by
Lauren N. Liberda
Browse files
vider support
parent
19602fb3
Pipeline
#475
failed with stage
in 2 minutes and 11 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
haruhi_dl/extractor/extractors.py
View file @
d464b291
...
...
@@ -1513,6 +1513,7 @@ from .videomore import (
)
from
.videopress
import
VideoPressIE
from
.videotarget
import
VideoTargetIE
from
.vider
import
ViderIE
from
.vidio
import
VidioIE
from
.vidlii
import
VidLiiIE
from
.vidme
import
(
...
...
haruhi_dl/extractor/vider.py
0 → 100644
View file @
d464b291
from
.common
import
InfoExtractor
class
ViderIE
(
InfoExtractor
):
_VALID_URL
=
r
'https?://vider\.(?:pl|info)/(?:vid/\+f|embed/video/)(?P<id>[a-z\d]+)'
_TESTS
=
[{
'url'
:
'https://vider.info/vid/+fsx51se'
,
'info_dict'
:
{
'id'
:
'sx51se'
,
'ext'
:
'mp4'
,
'title'
:
'Big Buck Bunny'
,
'upload_date'
:
'20210906'
,
'timestamp'
:
1630927351
,
},
}]
def
_real_extract
(
self
,
url
):
video_id
=
self
.
_match_id
(
url
)
webpage
=
self
.
_download_webpage
(
f
'https://vider.info/vid/+f
{
video_id
}
'
,
video_id
)
json_ld
=
self
.
_parse_json
(
self
.
_search_regex
(
r
'(?s)<script type="application/ld\+json">(.+?)</script>'
,
webpage
,
'JSON-LD'
),
video_id
)
info_dict
=
self
.
_json_ld
(
json_ld
,
video_id
)
# generated SEO junk
info_dict
[
'description'
]
=
None
info_dict
[
'id'
]
=
video_id
info_dict
[
'formats'
]
=
[{
'url'
:
self
.
_search_regex
(
r
'\?file=(.+)'
,
json_ld
[
'embedUrl'
],
'video url'
),
'http_headers'
:
{
'Referer'
:
'https://vider.info/'
,
},
}]
return
info_dict
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