cleanup
This commit is contained in:
@@ -19,6 +19,8 @@ def fetch_page_content(url):
|
||||
|
||||
|
||||
def extract_video_data(page_content):
|
||||
# ``videos_manifest`` lines embed a JSON blob with the stream metadata
|
||||
# inside a larger script tag; grab that entire line for further parsing.
|
||||
match = re.search(r'^.*videos_manifest.*$', page_content, re.MULTILINE)
|
||||
if not match:
|
||||
raise ValueError("Failed to extract video manifest from the response.")
|
||||
|
||||
Reference in New Issue
Block a user