Add progress bar
This commit is contained in:
@@ -2,7 +2,7 @@ import json
|
||||
import re
|
||||
import httpx
|
||||
from .. import config
|
||||
from ..exceptions import InvalidVideoIdException
|
||||
from ..exceptions import InvalidVideoIdException, PatternUnmatchError
|
||||
from ..util.extract_video_id import extract_video_id
|
||||
|
||||
headers = config.headers
|
||||
@@ -91,6 +91,8 @@ class VideoInfo:
|
||||
|
||||
def _parse(self, text):
|
||||
result = re.search(pattern, text)
|
||||
if result is None:
|
||||
raise PatternUnmatchError(text)
|
||||
res = json.loads(result.group(1)[:-1])
|
||||
response = self._get_item(res, item_response)
|
||||
if response is None:
|
||||
|
||||
Reference in New Issue
Block a user