diff --git a/app.py b/app.py index 8956e84..22e4bdd 100644 --- a/app.py +++ b/app.py @@ -1,6 +1,7 @@ import os import http.cookiejar import json +import re import requests from bs4 import BeautifulSoup from flask import Flask, Response, request, jsonify @@ -364,6 +365,8 @@ def proxy(video_id): if og_title: og_tags_str += f'\n' if og_description: + if og_title: + og_description = re.sub(rf"^{re.escape(og_title)}(\s+\[.*?\])?\s+", "", og_description) og_tags_str += f'\n' # og_tags_str += '\n' # og_tags_str += f'\n'