Make it possible to extract video id from url

This commit is contained in:
taizan-hokuto
2020-07-24 14:03:07 +09:00
parent 5ab653a1b2
commit 0abf8dd9f0
8 changed files with 54 additions and 16 deletions

View File

@@ -3,6 +3,7 @@ from . import duplcheck
from .. videoinfo import VideoInfo
from ... import config
from ... exceptions import InvalidVideoIdException
from ... util.extract_video_id import extract_video_id
logger = config.logger(__name__)
headers = config.headers
@@ -14,7 +15,7 @@ class Extractor:
raise ValueError('div must be positive integer.')
elif div > 10:
div = 10
self.video_id = video_id
self.video_id = extract_video_id(video_id)
self.div = div
self.callback = callback
self.processor = processor