Page 6 of 13

You2Pup 1.4

Posted: Mon 24 May 2010, 16:33
by bigpup
synth's You2pup version 1.4 for Quirky and Puppy:

you2pup mirror

Posted: Mon 24 May 2010, 16:36
by russoodle
Here you go:

http://puppylinuxstuff.meownplanet.net/ ... up-1.4.pet

user: puppy
pass: linux

Posted: Mon 24 May 2010, 17:01
by Sit Heel Speak
Thanks.

Posted: Tue 25 May 2010, 02:53
by trio
soliver & synth

Thanks for helping and great job, please notify Barry to update

reg,

Trio

youtube.sh

Posted: Wed 26 May 2010, 09:32
by soliver
Hello there

changed the youtube.sh code. Now there is a -q option for quality setting.
Try it out and see the pictures below.

here is the code:

Code: Select all

#!/bin/bash

# YouTube download script by John Lawrence (http://blog.johnlawrence.net)
#Modified for puppy by trio - 2009
#100514 soliver: fix youtube.com change may 2010.
#100526 soliver: add quality settings

use_err() {
  echo "Usage:   `basename $0` [-f savefile] video_id [-q quality]"
  echo "Quality: `basename $0` -q 5,18,34,35 the higher the better and 13,17 for 3gpp"
  echo "Quality: You'll have to try out what's working for your vid."
  echo "Example: `basename $0` -f Rick oHg5SJYRHA0 -q 18"
  echo "         Saves video with id oHg5SJYRHA0 to Rick.flv in your current directory"
  echo "         with good quality."
  echo
  exit 65
}

if [ ! $1 ]; then use_err; fi

while getopts ":f:" Option
do
  case $Option in
    f     ) fn=$OPTARG;;
    *     ) use_err;;
  esac
done

shift $(($OPTIND - 1))

if [ -z $1 ];  then use_err; fi
if [ -z $fn ]; then fn=$1; fi

vidID=$1
filename=$fn".mp4"

while getopts ":q:" Option
do
  case $Option in
    q     ) q=$OPTARG;;
    *     ) use_err;;
  esac
done

shift $(($OPTIND - 2))

if [ -z $2 ];  then use_err; fi
if [ -z $q ];  then q=$2; fi

quality=$2
qsetting=$q

geturl() { echo "GET $1 HTTP/1.1";echo "Host: $2";echo;echo;sleep 2;echo '^C'; }

echo "Finding hostname"
#100514 soliver: fix youtube.com change may 2010...
#hostl=`geturl /watch youtube.com | nc youtube.com 80 | grep Location | sed 's|Location: http://\([^/]*\)/.*|\1|' | tr -d '\r\n'`
hostl=`geturl /href youtube.com | nc youtube.com 80 | grep Location | sed 's|Location: http://\([^/]*\)/.*|\1|' | tr -d '\r\n'`
echo "Connecting to "$hostl

watch="/watch?v="$vidID
tid=`geturl $watch $hostl | nc youtube.com 80 | grep '"t":' | sed 's/.*"t": "\([^"]*\)".*/\1/'`

echo "Locating video file"
get_video="/get_video?video_id="$vidID"&t="$tid"&el=detailpage&ps=&fmt="$qsetting""
url=`geturl $get_video $hostl | nc youtube.com 80 | grep Location | sed 's/Location: \(.*\)$/\1/' | tr -d '\r\n'`

wget -O - -t 7 -w 5 --waitretry=14 --random-wait '--user-agent=Mozilla/5.0' -e robots=off $url > $filename

tx to bigpup and panzerpuppy for the idea!!

POST YOUR FEEDBACK!!

thanks and take care


please have a look at pcrypt and pdircrypt :roll:

you2pup-1.4.1

Posted: Sun 30 May 2010, 10:54
by soliver
Hello there

Made a new you2pup with the above quality-settings.

Please test it and post your feedback.

synth: feel free to change the source, should only be an example.

Take care

Posted: Sun 30 May 2010, 16:07
by abushcrafter
It works if there are no spaces in file name. It also adds ".mp4" to the file name when that format is not used for some quality's.

you2pup

Posted: Sun 30 May 2010, 19:27
by soliver
Thanks abushcrafter for replying.

The problem of spaces in filenames is not new. I made my own you2pup and there is a message for that.
I don't know how to change the script, so that the right file format is written.
Most of the time you can download mp4. If I change the ending to flv the 3gpp files are not right. Hmm. Hope somebody can help.

Take care

Posted: Mon 31 May 2010, 10:21
by abushcrafter
Bingo! :D. I have fixed the file names with spaces issue :P. Here is how:
  1. Open the file: "/usr/sbin/youtube.sh".
  2. On line 68.
  3. Put the variable "$filename" in quotes. I used double quotes.
Like so:

Code: Select all

wget -O - -t 7 -w 5 --waitretry=14 --random-wait '--user-agent=Mozilla/5.0' -e robots=off $url > "$filename"
Another issue is that Gxine in 431/2v3 can't play quality 34(...and some others.). However this the build of mplayer can: Puppy Linux Discussion Forum :: View topic - Mplayer with Multi-core support (09/2009) + gnome frontend. On some quality settings "Mplayer with Multi-core support (09/2009)" can't play them too but MPlayer-1.0rc2 + mencoder Feb 2008 can.

Posted: Mon 31 May 2010, 11:25
by abushcrafter
Made a new pet.
Version=1.4.2
Changes:
  • Removed the .mp4 renaming.
  • File names with spaces fix.
  • Edited the menu entry to how I like it.
Download:
File Deleted! See "1.4.3".

thanks

Posted: Mon 31 May 2010, 19:45
by soliver
Thanks for making this possible. I'm happy to have a real youtube downloader with these options.

Sorry, but your menu entry is not right. You'll have to rename the pic or the icon in youtube.desktop. The rest is working great!!

What do you think of using ffconvert to convert the files? I'm using it but not happy with my text to it. Or just making a button like "convert with ffconvert".

Greets and take care

New PET!

Posted: Mon 31 May 2010, 20:31
by abushcrafter
soliver wrote:Sorry, but your menu entry is not right. You'll have to rename the pic or the icon in youtube.desktop.
?

Version=1.4.3
md5sum=ccc631f40c2c5e1e763befa44adc847a
ChangeLog:
  • Used the wrong menu entry!
Download:
http://myfreefilehosting.com/f/13184d370c_0.01MB

You2pup 1.4.3

Posted: Tue 01 Jun 2010, 18:49
by bigpup
abushcrafter's new version direct download:

Posted: Sun 13 Jun 2010, 22:27
by abushcrafter
In this version I have fixed Licensing so I think it is now properly legal and tided up comments at the beginning of the scripts. I have also updated the version numbers in the GUI.

Posted: Sat 03 Jul 2010, 07:25
by fzimmer
133 and 134 loads only 88B from

http://www.youtube.com/watch?v=9Dbfdhyvfxc

Where can i please ask for help?

Posted: Thu 22 Jul 2010, 17:58
by Georgestevenson1830
Hi,

I've been following this thread as a guest for about a year now as I like to use you2pup and occasionally it stops working.

I don't seem to be able to get you2pup working today. I have upgraded from v1.4 to 1.4.4 but still no luck. Has anything changed at youtube again does anyone know?

Thanks.

just copy from /tmp

Posted: Thu 12 Aug 2010, 20:02
by CGP
Here I expand a little on panzerpuppy's solution.

(I post this because it took me a little time to figure out that the video file is in .flv format and because Windows Media Player 9 will not play .flv files)

The following works fine and obviates the need for you2pup on Puppy 4.3.1.

Using Seamonkey1.1.18, start playing the Youtube video you want to download. Pause it. Wait until the entire video is buffered. You don't need to play even a moment of it. Or, if you want, you can watch some or all of it. Then

Go into /tmp. Rename the file 'Flash...' to, for example 'GreatVideo.flv'. Copy that file out to a computer running Windows.

Play the video using Adobe Media Player 1.8.

That is all. Works great as of Aug 12, 2010.

no need for you2pup as per panzerpuppy

Posted: Thu 12 Aug 2010, 20:07
by CGP
Here I expand a little on panzerpuppy's solution.

(I post this because it took me a little time to figure out that the video file is in .flv format and because Windows Media Player 9 will not play .flv files)

The following works fine and obviates the need for you2pup on Puppy 4.3.1.

Using Seamonkey1.1.18, start playing the Youtube video you want to download. Pause it. Wait until the entire video is buffered. You don't need to play even a moment of it. Or, if you want, you can watch some or all of it. Then

Go into /tmp. Rename the file 'Flash...' to, for example 'GreatVideo.flv'. Move that file out to a computer running Windows.

Play the video using Adobe Media Player 1.8.

That is all. Works great as of Aug 12, 2010.

Re: just copy from /tmp

Posted: Thu 12 Aug 2010, 21:33
by aarf
CGP wrote:Here I expand a little on panzerpuppy's solution.

(I post this because it took me a little time to figure out that the video file is in .flv format and because Windows Media Player 9 will not play .flv files)

The following works fine and obviates the need for you2pup on Puppy 4.3.1.

Using Seamonkey1.1.18, start playing the Youtube video you want to download. Pause it. Wait until the entire video is buffered. You don't need to play even a moment of it. Or, if you want, you can watch some or all of it. Then

Go into /tmp. Rename the file 'Flash...' to, for example 'GreatVideo.flv'. Copy that file out to a computer running Windows.

Play the video using Adobe Media Player 1.8.

That is all. Works great as of Aug 12, 2010.
if it is the same as opera, the 'Flash...' files will play in gnomeplayer in quirky.

Posted: Sun 15 Aug 2010, 16:13
by aarf
mplayer-post-1.0rc3-svn-31792-i486.pet also plays the flashxxx straight out of /tmp