Default to yt-dlp
This commit is contained in:
parent
3553aaf427
commit
855ec364ce
|
@ -1,9 +1,14 @@
|
||||||
|
import sys
|
||||||
import time
|
import time
|
||||||
import json
|
import json
|
||||||
import random
|
import random
|
||||||
import logging
|
import logging
|
||||||
import feedparser
|
import feedparser
|
||||||
from io import BytesIO
|
from io import BytesIO
|
||||||
|
try:
|
||||||
|
from yt_dlp.extractor import youtube
|
||||||
|
except Exception as e:
|
||||||
|
print(f'Failed to import yt_dlp due to {type(e).__name__}: {e}, importing youtube_dl', file=sys.stderr)
|
||||||
from youtube_dl.extractor import youtube
|
from youtube_dl.extractor import youtube
|
||||||
from . import config, client, seen_videos
|
from . import config, client, seen_videos
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import re
|
import re
|
||||||
import os
|
import os
|
||||||
|
import sys
|
||||||
import json
|
import json
|
||||||
import time
|
import time
|
||||||
import random
|
import random
|
||||||
|
@ -10,6 +11,10 @@ import traceback
|
||||||
from io import BytesIO
|
from io import BytesIO
|
||||||
from decimal import Decimal
|
from decimal import Decimal
|
||||||
from urllib.parse import urlparse
|
from urllib.parse import urlparse
|
||||||
|
try:
|
||||||
|
from yt_dlp import YoutubeDL
|
||||||
|
except Exception as e:
|
||||||
|
print(f'Failed to import yt_dlp due to {type(e).__name__}: {e}, importing youtube_dl', file=sys.stderr)
|
||||||
from youtube_dl import YoutubeDL
|
from youtube_dl import YoutubeDL
|
||||||
from . import session, config, client, seen_videos
|
from . import session, config, client, seen_videos
|
||||||
from .utils import update_seen_videos, get_video_list
|
from .utils import update_seen_videos, get_video_list
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
youtube-dl
|
yt-dlp
|
||||||
feedparser
|
feedparser
|
||||||
telethon
|
telethon
|
||||||
aiohttp
|
aiohttp
|
||||||
|
|
Loading…
Reference in New Issue