Author Topic: clipgrab  (Read 23122 times)

mauro

  • Sr. Member
  • ****
  • Posts: 415
  • Karma: +3/-0
    • View Profile
clipgrab
« on: February 02, 2021, 11:57:12 pm »
Good evening, I've just downloaded/installed ClipGrab 3.7.2  by his rpm package (ANPM).
It starts, but after pasted a youtube video link in the field for downloading, it warns that link is not a valid one for video contents.
Has it maybe become obsolete due to a Youtube platform update against video grabbing?
Thank you

Dave Yeo

  • Hero Member
  • *****
  • Posts: 5046
  • Karma: +114/-1
    • View Profile
Re: clipgrab
« Reply #1 on: February 03, 2021, 01:28:29 am »
Wouldn't be surprised if YouTube changed its API again. Also watch out for ampersands and such in the URL, IIRC you need to prune  the ampersand and following text off.

mauro

  • Sr. Member
  • ****
  • Posts: 415
  • Karma: +3/-0
    • View Profile
Re: clipgrab
« Reply #2 on: February 03, 2021, 07:07:53 pm »
Thank you for answering Dave, no amperstands appear in the URL

TeLLie

  • Full Member
  • ***
  • Posts: 239
  • Karma: +12/-0
    • View Profile
Re: clipgrab
« Reply #3 on: February 03, 2021, 07:30:37 pm »
Hi,
The version you downloaded is a bit outdated unfortunately.
The newer version of clipgrab needs webenginewidgets and that we dont have yet.
So  we need to wait till BWW have made it ready for us...

But  donations, are welcome for BWW, so they can further work on QT5 and more OS/2 based projects ....

mauro

  • Sr. Member
  • ****
  • Posts: 415
  • Karma: +3/-0
    • View Profile
Re: clipgrab
« Reply #4 on: February 06, 2021, 09:16:18 am »
Hi,
The version you downloaded is a bit outdated unfortunately.
The newer version of clipgrab needs webenginewidgets and that we dont have yet.
So  we need to wait till BWW have made it ready for us...

But  donations, are welcome for BWW, so they can further work on QT5 and more OS/2 based projects ....

Understand, thank you

TeLLie

  • Full Member
  • ***
  • Posts: 239
  • Karma: +12/-0
    • View Profile
Re: clipgrab
« Reply #5 on: March 19, 2021, 08:25:44 pm »
Hi,

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

  • Hero Member
  • *****
  • Posts: 5046
  • Karma: +114/-1
    • View Profile
Re: clipgrab
« Reply #6 on: March 19, 2021, 11:01:39 pm »
Works here, after minor patching to disable CTYPES,
With a new clone from github,
Code: [Select]
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
.f248.webm
[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)

Quick hack, needs work, likely just operating system changes like (if NT and !os2) but I have to look up the correct syntax.
Code: [Select]
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'):
         return
 
     try:

And of course packaging.

Dave Yeo

  • Hero Member
  • *****
  • Posts: 5046
  • Karma: +114/-1
    • View Profile
Re: clipgrab
« Reply #7 on: March 19, 2021, 11:17:25 pm »
Tried running make, which failed due to no pandoc installed. It did package it somewhat, but running the script gives weirdness,
Code: [Select]
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

Note that the script seems to be zipped or such,
Code: [Select]
H:\tmp>file youtube-dl
youtube-dl: a /usr/bin/env python script executable (binary data)

Dave Yeo

  • Hero Member
  • *****
  • Posts: 5046
  • Karma: +114/-1
    • View Profile
Re: clipgrab
« Reply #8 on: March 19, 2021, 11:39:03 pm »
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

TeLLie

  • Full Member
  • ***
  • Posts: 239
  • Karma: +12/-0
    • View Profile
Re: clipgrab
« Reply #9 on: March 20, 2021, 12:47:41 pm »
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
« Last Edit: March 20, 2021, 03:29:38 pm by TeLLie »

Dave Yeo

  • Hero Member
  • *****
  • Posts: 5046
  • Karma: +114/-1
    • View Profile
Re: clipgrab
« Reply #10 on: March 20, 2021, 04:59:07 pm »
Did you run it in the parent of the youtube-dl subdirectory?  E:\GCC in your case.

Dariusz Piatkowski

  • Hero Member
  • *****
  • Posts: 1351
  • Karma: +26/-0
    • View Profile
Re: clipgrab
« Reply #11 on: March 20, 2021, 05:07:41 pm »
TeLLie,
...If i unzip it and run

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

I think the proper module name to run is actually 'YoutubeDL.py', at least that's what Dave has in his bundle...unless of course 'youtube-dl' is actually a clipgrab module name...not sure as I do not have clipgrab instaled here.
« Last Edit: March 20, 2021, 05:10:50 pm by Dariusz Piatkowski »

Dave Yeo

  • Hero Member
  • *****
  • Posts: 5046
  • Karma: +114/-1
    • View Profile
Re: clipgrab
« Reply #12 on: March 20, 2021, 05:43:45 pm »
TeLLie,
...If i unzip it and run

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

I think the proper module name to run is actually 'YoutubeDL.py', at least that's what Dave has in his bundle...unless of course 'youtube-dl' is actually a clipgrab module name...not sure as I do not have clipgrab instaled here.

It's the whole subdirectory that needs to be run, not an individual file. As I said, it is unpackaged and packaging should create a binary script holding the subdirectory and documentation.

TeLLie

  • Full Member
  • ***
  • Posts: 239
  • Karma: +12/-0
    • View Profile
Re: clipgrab
« Reply #13 on: March 20, 2021, 06:53:25 pm »
Hi Dave,
I used youtube-dl all the time till i saw you called it youtube_dl :)
Now its working
E:\GCC\youtube-dl>python -m youtube_dl https://www.youtube.com/watch?v=U4_RFEY5WDA
[youtube] U4_RFEY5WDA: Downloading webpage
[download] Destination: Lady Gaga - Million Reasons _ Yoü and I _ The Edge of Glory live at One America Appeal-U4_RFEY5WDA.f136.mp4
[download] 100% of 72.14MiB in 00:07
[download] Destination: Lady Gaga - Million Reasons _ Yoü and I _ The Edge of Glory live at One America Appeal-U4_RFEY5WDA.f140.m4a
[download] 100% of 20.38MiB in 00:02
[ffmpeg] Merging formats into "Lady Gaga - Million Reasons _ Yoü and I _ The Edge of Glory live at One America Appeal-U4_RFEY5WDA.mp4"

Btw: python3 is much faster to use...
« Last Edit: March 20, 2021, 07:00:36 pm by TeLLie »

Dave Yeo

  • Hero Member
  • *****
  • Posts: 5046
  • Karma: +114/-1
    • View Profile
Re: clipgrab
« Reply #14 on: March 20, 2021, 07:05:34 pm »
Yea, it looks like I screwed up with directions, the underline is correct. Good that it is working for you and I see you're getting good download speeds.