OS/2, eCS & ArcaOS - Technical > Web applications


<< < (2/5) > >>


I just compile the latest Clipgrab but unfortunately  it wont work with OS2 anymore.
ClipGrab uses youtube-dl in order to download videos from the Internet
And the Os2 python dont work with youtube-dl

So for now its a no go, sorry  :'(

Dave Yeo:
Works here, after minor patching to disable CTYPES,
With a new clone from github,

--- Code: ---K:\work\youtube-dl>python -m youtube_dl https://www.youtube.com/watch?v=JV7xHhvo
[youtube] JV7xHhvowGc: Downloading webpage
[download] Destination: taking Rubber band ball to pawn shop #shorts-JV7xHhvowGc
[download] 100% of 18.23MiB in 00:1706MiB/s ETA 00:008
[download] Destination: taking Rubber band ball to pawn shop #shorts-JV7xHhvowGc.f251.webm
[download] 100% of 999.34KiB in 00:0013MiB/s ETA 00:001
[ffmpeg] Merging formats into "taking Rubber band ball to pawn shop #shorts-JV7xHhvowGc.webm"
Deleting original file taking Rubber band ball to pawn shop #shorts-JV7xHhvowGc.f248.webm (pass -k to keep)
Deleting original file taking Rubber band ball to pawn shop #shorts-JV7xHhvowGc.f251.webm (pass -k to keep)

--- End code ---

Quick hack, needs work, likely just operating system changes like (if NT and !os2) but I have to look up the correct syntax.

--- Code: ---diff --git a/youtube_dl/YoutubeDL.py b/youtube_dl/YoutubeDL.py
index 8f65c6499..0018c1a4a 100755
--- a/youtube_dl/YoutubeDL.py
+++ b/youtube_dl/YoutubeDL.py
@@ -109,8 +109,8 @@ from .postprocessor import (
 from .version import __version__
-if compat_os_name == 'nt':
-    import ctypes
+#if compat_os_name == 'nt':
+#    import ctypes
 class YoutubeDL(object):
diff --git a/youtube_dl/compat.py b/youtube_dl/compat.py
index 6c3d49d45..d1a8feae6 100644
--- a/youtube_dl/compat.py
+++ b/youtube_dl/compat.py
@@ -4,7 +4,7 @@ from __future__ import unicode_literals
 import base64
 import binascii
 import collections
-import ctypes
+#import ctypes
 import email
 import getpass
 import io
diff --git a/youtube_dl/utils.py b/youtube_dl/utils.py
index 8e4d144c9..966d202eb 100644
--- a/youtube_dl/utils.py
+++ b/youtube_dl/utils.py
@@ -9,7 +9,7 @@ import calendar
 import codecs
 import collections
 import contextlib
-import ctypes
+#import ctypes
 import datetime
 import email.utils
 import email.header
@@ -3520,7 +3520,7 @@ def setproctitle(title):
     # ctypes in Jython is not complete
     # http://bugs.jython.org/issue2148
-    if sys.platform.startswith('java'):
+    if sys.platform.startswith('os2'):

--- End code ---

And of course packaging.

Dave Yeo:
Tried running make, which failed due to no pandoc installed. It did package it somewhat, but running the script gives weirdness,

--- Code: ---H:\tmp>python youtube-dl
Usage: youtube-dl [OPTIONS] URL [URL...]

youtube-dl: error: You must provide at least one URL.
Type youtube-dl --help to see a list of all options.

H:\tmp>python youtube_dl https://www.youtube.com/watch?v=JV7xHhvowGc
W:\USR\BIN\python.exe: can't open file 'youtube_dl': [Errno 2] No such file or directory

--- End code ---

Note that the script seems to be zipped or such,

--- Code: ---H:\tmp>file youtube-dl
youtube-dl: a /usr/bin/env python script executable (binary data)

--- End code ---

Dave Yeo:
Anyways for now, here's the unpackaged youtube-dl. Unluckily it is very CPU intensive while loading, taking almost a minute on this I5 before it does anything.
Create a directory, yt-down or whatever. Unzip the file. run python -m youtube-dl url or python -m youtube-dl --help | less to see the possible options.
Also doesn't seem to like to run on an HPFS volume, so use a JFS volume

Hi Dave

Thankz, will look if this works with clipgrab  :)

If i unzip it and run

E:\GCC\youtube-dl>python -m youtube-dl
C:/USR/BIN/python.exe: No module named youtube-dl


[0] Message Index

[#] Next page

[*] Previous page

Go to full version