[common] add '_extract_nextdata' method
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
"""Extractors for https://www.slideshare.net/"""
|
||||
|
||||
from .common import GalleryExtractor
|
||||
from .. import text, util
|
||||
from .. import text
|
||||
|
||||
|
||||
class SlidesharePresentationExtractor(GalleryExtractor):
|
||||
@@ -31,8 +31,7 @@ class SlidesharePresentationExtractor(GalleryExtractor):
|
||||
GalleryExtractor.__init__(self, match, url)
|
||||
|
||||
def metadata(self, page):
|
||||
data = util.json_loads(text.extr(
|
||||
page, 'id="__NEXT_DATA__" type="application/json">', '</script>'))
|
||||
data = self._extract_nextdata(page)
|
||||
self.slideshow = slideshow = data["props"]["pageProps"]["slideshow"]
|
||||
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user