From 6a78b81084618925e70cd28cde456fcc695e26ae Mon Sep 17 00:00:00 2001 From: MMaker Date: Mon, 3 Mar 2025 13:14:12 -0500 Subject: [PATCH] Remove title and category from OG description --- app.py | 3 +++ 1 file changed, 3 insertions(+) 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'