search not working #3

Closed
opened 2017-04-26 11:44:26 -05:00 by hoijui · 5 comments
hoijui commented 2017-04-26 11:44:26 -05:00 (Migrated from github.com)

hey! :-)
am on Trisquel 7 in bash and using shellTube from this repo as of 26. april 2017.
i start:

./shellTube

then try to search:

>> / funny
./lib/yt-search: 32: [: -i: unexpected operator
./lib/yt-search: 42: ./lib/yt-search: Syntax error: "(" unexpected
sed: -e expression #1, char 1: unknown command: `f'
sed: -e expression #1, char 1: unknown command: `f'
No video specified.

any idea?
am i doing it wrong?

hey! :-) am on Trisquel 7 in bash and using shellTube from this repo as of 26. april 2017. i start: ./shellTube then try to search: >> / funny ./lib/yt-search: 32: [: -i: unexpected operator ./lib/yt-search: 42: ./lib/yt-search: Syntax error: "(" unexpected sed: -e expression #1, char 1: unknown command: `f' sed: -e expression #1, char 1: unknown command: `f' No video specified. any idea? am i doing it wrong?
happyGNU commented 2017-04-26 17:26:27 -05:00 (Migrated from github.com)

try
./shelltube.sh
>>help

It will give you an output like

>>help
clear Clear the screen.
download Download the selected video.
exit Exit Shelltube.
help Display this message.
metadata Display selected video's metadata.
search Perform a search.
stream Stream the selected video.
video Select video based on URL or ID.

So now you can remember commands :)

You can do
>>search funny

  1. https://lifeawesome.net/
    Life Awesome | </div | kwoLsW_qDYE
  2. AFV Funny Vines Fails Compilation - Best Vines 2016
    VineAholic | </div | 0pxaHyz_E5w
  3. Funny videos 2016 : Stupid people doing stupid things
    YTLaugh | </div | GgxSvFoQ59k
  4. TRY NOT TO LAUGH or GRIN - Funny Kids Fails Compilation 2017 - Co Viners
    Co Viners | </div | vhkcRxCXcyo

You have to copy the ID of the video the part after |</div| and write video ID

>> video kT_KMsh1ARs

and it will output something like this

>> video kT_KMsh1ARs

Top New Zach King Funny Magic Vines - Best Magic Tricks Ever JokerIsME | 7365920 | </div><div class="yt-lockup-content"><h3 class="yt-lockup-title "><a href="/watch?v=kT_KMsh1ARs" class="yt-uix-tile-link yt-ui-ellipsis yt-ui-ellipsis-2 yt-uix-sessionlink spf-link " data-sessionlink="itct=CCYQ3DAYACITCJql_s-Uw9MCFQNbPwod3r0M4yj0JFILa1RfS01zaDFBUnM" title="Top New Zach King Funny Magic Vines - Best Magic Tricks Ever" aria-describedby="description-id-978209" rel="spf-prefetch" dir="ltr">Top New Zach King Funny Magic Vines - Best Magic Tricks Ever</a><span class="accessible-description" id="description-id-978209"> - Duración: 16:53</span></h3><div class="yt-lockup-byline "><a href="/channel/UC1A6qwJmTY77-n_HqqLNUFw" class="g-hovercard yt-uix-sessionlink spf-link " data-ytid="UC1A6qwJmTY77-n_HqqLNUFw" data-sessionlink="itct=CCYQ3DAYACITCJql_s-Uw9MCFQNbPwod3r0M4yj0JA" >JokerIsME</a>&nbsp;<span class="yt-uix-tooltip yt-channel-title-icon-verified yt-sprite" title="Verificada"></span></div><div class="yt-lockup-meta "><ul class="yt-lockup-meta-info"><li>Hace 1 mes</li><li>7,284,271 vistas</li></ul></div><div class="yt-lockup-description yt-ui-ellipsis yt-ui-ellipsis-2" dir="ltr">Top New Zach King Funny Magic Vines - Best Magic Tricks Ever More Zach King magic vines : <a href="https://youtu | 2017-03-24 | kT_KMsh1ARs
kT_KMsh1ARs >>

So now do stream

kT_KMsh1ARs >> stream

Formats:
1. mp4,hd720
2. webm,medium
3. mp4,medium
4. 3gpp,small
5. 3gpp,small
>>

Select prefered format (this case 2)

>>2

Enjoy :) (it will use VLC so make sure you have it)

try `./shelltube.sh` `>>help` It will give you an output like `>>help` `clear Clear the screen.` `download Download the selected video.` `exit Exit Shelltube.` `help Display this message.` `metadata Display selected video's metadata.` `search Perform a search.` `stream Stream the selected video.` `video Select video based on URL or ID.` So now you can remember commands :) You can do `>>search funny ` >>1. https://lifeawesome.net/ Life Awesome | </div | kwoLsW_qDYE >>2. AFV Funny Vines Fails Compilation - Best Vines 2016 VineAholic | </div | 0pxaHyz_E5w >>3. Funny videos 2016 : Stupid people doing stupid things YTLaugh | </div | GgxSvFoQ59k >>4. TRY NOT TO LAUGH or GRIN - Funny Kids Fails Compilation 2017 - Co Viners Co Viners | </div | vhkcRxCXcyo You have to copy the ID of the video the part after |</div| and write video ID `>> video kT_KMsh1ARs ` and it will output something like this ` >> video kT_KMsh1ARs` `Top New Zach King Funny Magic Vines - Best Magic Tricks Ever JokerIsME | 7365920 | </div><div class="yt-lockup-content"><h3 class="yt-lockup-title "><a href="/watch?v=kT_KMsh1ARs" class="yt-uix-tile-link yt-ui-ellipsis yt-ui-ellipsis-2 yt-uix-sessionlink spf-link " data-sessionlink="itct=CCYQ3DAYACITCJql_s-Uw9MCFQNbPwod3r0M4yj0JFILa1RfS01zaDFBUnM" title="Top New Zach King Funny Magic Vines - Best Magic Tricks Ever" aria-describedby="description-id-978209" rel="spf-prefetch" dir="ltr">Top New Zach King Funny Magic Vines - Best Magic Tricks Ever</a><span class="accessible-description" id="description-id-978209"> - Duración: 16:53</span></h3><div class="yt-lockup-byline "><a href="/channel/UC1A6qwJmTY77-n_HqqLNUFw" class="g-hovercard yt-uix-sessionlink spf-link " data-ytid="UC1A6qwJmTY77-n_HqqLNUFw" data-sessionlink="itct=CCYQ3DAYACITCJql_s-Uw9MCFQNbPwod3r0M4yj0JA" >JokerIsME</a>&nbsp;<span class="yt-uix-tooltip yt-channel-title-icon-verified yt-sprite" title="Verificada"></span></div><div class="yt-lockup-meta "><ul class="yt-lockup-meta-info"><li>Hace 1 mes</li><li>7,284,271 vistas</li></ul></div><div class="yt-lockup-description yt-ui-ellipsis yt-ui-ellipsis-2" dir="ltr">Top New Zach King Funny Magic Vines - Best Magic Tricks Ever More Zach King magic vines : <a href="https://youtu | 2017-03-24 | kT_KMsh1ARs` `kT_KMsh1ARs >> ` So now do stream `kT_KMsh1ARs >> stream` `Formats:` `1. mp4,hd720` `2. webm,medium` `3. mp4,medium` `4. 3gpp,small` `5. 3gpp,small` `>>` Select prefered format (this case 2) `>>2 ` Enjoy :) (it will use VLC so make sure you have it)
JadedCtrl commented 2017-04-26 19:07:35 -05:00 (Migrated from github.com)

Hey, that might be a usage error, like alberto pointed out-- "/ this" should be "/this"
It also might be an issue with the first line of the script, "#!/bin/sh"
Running the script with "./" instead of "bash" invokes sh, which in some systems (including Trisquel, I think) means dash. Shelltube does not support dash. Every attempt at being compatible with dash has broken compatibility with a few other shells... it's just not worth it. You should try replacing "#!/bin/sh" with "#!/bin/bash" in every script of Shelltube.
Please try this and get back to me-- I can't test on bash right now, so I'd really appreciate it! :)

Hey, that might be a usage error, like alberto pointed out-- "/ this" should be "/this" It also might be an issue with the first line of the script, "#!/bin/sh" Running the script with "./" instead of "bash" invokes _sh_, which in some systems (including Trisquel, I think) means _dash_. Shelltube does not support dash. Every attempt at being compatible with dash has broken compatibility with a few other shells... it's just not worth it. You should try replacing "#!/bin/sh" with "#!/bin/bash" in every script of Shelltube. Please try this and get back to me-- I can't test on bash right now, so I'd really appreciate it! :)
hoijui commented 2017-04-27 07:47:18 -05:00 (Migrated from github.com)

thanks guys! :-)
but it seems to be neither of the two...
i made sure that bash is used with:

find . -name "s*" -o -name "y*" | xargs sed --in-place --expression='s|bin/sh|bin/bash|'

and - as i already tried before - i tried with "/funny" or "search funny",
and i still get the same problem (plus some new ones!):

 >> search funny
./shelltube: line 48: yt-search: command not found
sed: -e expression #1, char 1: unknown command: `f'
sed: -e expression #1, char 1: unknown command: `f'
./shelltube: line 54: yt-meta: command not found

looks like the aliases are not working.. no idea why, cause that if statement is evaluated as true.

$ /bin/bash --version
GNU bash, version 4.3.11(1)-release (x86_64-pc-linux-gnu)
thanks guys! :-) but it seems to be neither of the two... i made sure that bash is used with: find . -name "s*" -o -name "y*" | xargs sed --in-place --expression='s|bin/sh|bin/bash|' and - as i already tried before - i tried with "/funny" or "search funny", and i still get the same problem (plus some new ones!): >> search funny ./shelltube: line 48: yt-search: command not found sed: -e expression #1, char 1: unknown command: `f' sed: -e expression #1, char 1: unknown command: `f' ./shelltube: line 54: yt-meta: command not found looks like the aliases are not working.. no idea why, cause that `if` statement is evaluated as true. $ /bin/bash --version GNU bash, version 4.3.11(1)-release (x86_64-pc-linux-gnu)
JadedCtrl commented 2017-04-27 18:56:26 -05:00 (Migrated from github.com)

Thanks, I'll check it out. :)

Thanks, I'll check it out. :)
JadedCtrl commented 2019-01-05 20:31:34 -06:00 (Migrated from github.com)

Well, it's been a while, jajaja-- but with this re-write, this isn't a problem anymore.

Well, it's been a while, jajaja-- but with this re-write, this isn't a problem anymore.
This repo is archived. You cannot comment on issues.
No Milestone
No Assignees
1 Participants
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: jadedctrl/shellTube#3
No description provided.