Changeset View
Changeset View
Standalone View
Standalone View
www/py-pafy/files/patch-pafy_pafy.py
--- pafy/pafy.py.orig 2018-02-11 21:15:57 UTC | --- pafy/pafy.py.orig 2019-11-20 14:42:31 UTC | ||||
+++ pafy/pafy.py | +++ pafy/pafy.py | ||||
@@ -45,6 +45,9 @@ Pafy = None | @@ -45,7 +45,10 @@ Pafy = None | ||||
backend = "internal" | backend = "internal" | ||||
if os.environ.get("PAFY_BACKEND") != "internal": | if os.environ.get("PAFY_BACKEND") != "internal": | ||||
try: | try: | ||||
- import youtube_dl | |||||
+ if sys.platform.startswith('freebsd'): | + if sys.platform.startswith('freebsd'): | ||||
+ # FreeBSD installs youtube_dl as a zip archive | + # FreeBSD installs youtube_dl as a zip archive | ||||
+ sys.path.insert(1, '%%LOCALBASE%%/bin/youtube-dl') | + sys.path.insert(1, '%%LOCALBASE%%/bin/youtube-dl') | ||||
import youtube_dl | + import yt_dlp | ||||
backend = "youtube-dl" | backend = "youtube-dl" | ||||
except ImportError: | except ImportError: | ||||
raise ImportError( |