|
|
@ -8,6 +8,7 @@ import re
|
|
|
|
import string
|
|
|
|
import string
|
|
|
|
import subprocess
|
|
|
|
import subprocess
|
|
|
|
import unicodedata
|
|
|
|
import unicodedata
|
|
|
|
|
|
|
|
from datetime import datetime
|
|
|
|
from urllib.parse import parse_qs, urlparse
|
|
|
|
from urllib.parse import parse_qs, urlparse
|
|
|
|
|
|
|
|
|
|
|
|
import yt_dlp
|
|
|
|
import yt_dlp
|
|
|
@ -88,6 +89,16 @@ def requests_headers():
|
|
|
|
return {"User-Agent": template}
|
|
|
|
return {"User-Agent": template}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def date_praser(timestamp):
|
|
|
|
|
|
|
|
"""return formatted date string"""
|
|
|
|
|
|
|
|
if isinstance(timestamp, int):
|
|
|
|
|
|
|
|
date_obj = datetime.fromtimestamp(timestamp)
|
|
|
|
|
|
|
|
elif isinstance(timestamp, str):
|
|
|
|
|
|
|
|
date_obj = datetime.strptime(timestamp, "%Y-%m-%d")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return datetime.strftime(date_obj, "%d %b, %Y")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class UrlListParser:
|
|
|
|
class UrlListParser:
|
|
|
|
"""take a multi line string and detect valid youtube ids"""
|
|
|
|
"""take a multi line string and detect valid youtube ids"""
|
|
|
|
|
|
|
|
|
|
|
|