Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lyrics script fails when it finds the lyrics #218

Open
2 of 9 tasks
Hickory420 opened this issue Mar 13, 2020 · 14 comments
Open
2 of 9 tasks

Lyrics script fails when it finds the lyrics #218

Hickory420 opened this issue Mar 13, 2020 · 14 comments

Comments

@Hickory420
Copy link

Issue Label:

  • Bug
  • New feature
  • Enhancement
  • New component

Description:

If its a bug make sure to include this section.

OS and OS version:

  • Mac
  • Linux 32 Bit
  • Linux 64 Bit
  • Windows 32 Bit
  • Windows 64 Bit

OS Version:
uname -a
Darwin MacBook-Pro 17.7.0 Darwin Kernel Version 17.7.0: Thu Jun 21 22:53:14 PDT 2018; root:xnu-4570.71.2~1/RELEASE_X86_64 x86_64

Issue is with lyrics
It doesn't successfully output the lyrics. There is something wrong with the logic in checking if the variable $lyrics is populated. See output below

$ bash -x lyrics -a street sweeper social club -s clap for the killers
+ currentVersion=1.23.0
+ configuredClient=
+ artist=false
+ song=false
+ filePath=
++ uname
+ [[ Darwin != \D\a\r\w\i\n ]]
+ getopts f:a:s:uvh opt
+ case "$opt" in
+ artist=true
++ echo -a street sweeper social club -s clap for the killers
++ grep -Eo '\-s'
+ [[ -s == \-\s ]]
+ song=true
++ echo -a street sweeper social club -s clap for the killers
++ grep -Eo '\-f'
+ [[ '' == \-\f ]]
+ getopts f:a:s:uvh opt
+ [[ 10 == \0 ]]
+ [[ 10 == \1 ]]
+ true
+ true
+ true
+ true
+ true
+ true
++ echo -a street sweeper social club -s clap for the killers
++ grep -Eo '\-s [ a-z A-Z 0-9 . \ ]*[ -]?'
++ sed s/-s//g
++ sed s/-//g
++ sed 's/^ //g'
+ song='clap for the killers'
+ [[ clap for the killers == '' ]]
++ echo -a street sweeper social club -s clap for the killers
++ grep -Eo '\-a [ a-z A-Z 0-9 . \ ]*[ -]?'
++ sed s/-a//g
++ sed s/-//g
++ sed 's/^ //g'
+ artist='street sweeper social club '
+ [[ street sweeper social club  == '' ]]
+ getConfiguredClient
+ command -v curl
+ configuredClient=curl
++ uname
+ [[ Darwin != \D\a\r\w\i\n ]]
+ checkInternet
+ httpGet github.com
+ getLyrics 'street sweeper social club ' 'clap for the killers'
++ echo street sweeper social club
++ sed 's/ /%20/g'
++ sed 's/&/%26/g'
++ sed s/,/%2C/g
++ sed s/-/%2D/g
+ encodedArtist=street%20sweeper%20social%20club
++ echo clap for the killers
++ sed 's/ /%20/g'
++ sed 's/&/%26/g'
++ sed s/,/%2C/g
++ sed s/-/%2D/g
+ encodedSong=clap%20for%20the%20killers
++ httpGet https://api.lyrics.ovh/v1/street%20sweeper%20social%20club/clap%20for%20the%20killers
++ case "$configuredClient" in
++ curl -A curl -s https://api.lyrics.ovh/v1/street%20sweeper%20social%20club/clap%20for%20the%20killers
+ response='{"lyrics":"Now can you clap for the killers?\nGive it up for them gangsters\nOne time for the killers\nDouble up for them gangsters\n\nWell I wrote this for criminals\nBut all of y'\''all should listen at me\nNow if you ever catch me snitchin'\''\nJust haul off and slap me\n\nThey on the other team\n\"Let'\''s rumble,\" is my thoughts exactly\nThey work for gangsters\nAnd they whacked Fred Hampton Jr.'\''s pappy\n\nAy playboy, pop '\''em with a pistol and get executed\nAy mama, murder '\''em with missiles and you get saluted\nGo '\''head and gank em for a grand, it'\''s DNA computed\nBut bankers bathe in the Bahamas off of billions looted\n\nNow can you clap?\nNow can you clap?\n\nNow can you clap for them killers?\nGive it up for them gangsters\nOne time for the killers\nDouble up for them gangsters\n\nWell I wrote this for criminals\nBut they the ones who wrote the laws\nThey ain'\''t on TV gettin'\'' arrested\nAll up in their draws\n\nThey stick their hands up politicians\nMake '\''em move their jaws\nAnd they be starving folks for bread\nUntil their breath pause\n\nAy take a memo Moneypenny, say the deed is done\nAnd you can bcc DC and say our leaders won\nBut first we fax the photograph of the opponents son\nAdjust the image, '\''cause it'\''s hard to see the gag and gun\n\nNow can you clap?\nNow can you clap?\nNow can you clap?\nNow can you clap?\n\nNow can you clap for them killers?\nGive it up for them gangsters\nOne time for the killers\nDouble up for them gangsters\n\nWell I wrote this for gangsters\nWhile I sprinted through your backyard\nNot for them Coppola criminals, they just act hard\nTony Montana had a stylist and a SAG card\nWhen he reloaded slaves forgot they had back scars\n\nAy, M-M-Mister DeNiro what kind of gun is that?\nCan you look more like a menace?\nTake two, now run it back\nAy s-s-so what Scorsese, got all them money stacks\nLong as his lens never looks at the real maniacs\n\nClap for them killers\nGive it up for them gangsters\nOne time for the killers\nDouble up for them gangsters\n\nCan you clap for them killers?\nGive it up for them gangsters\nOne time for the killers\nDouble up for them gangsters"}'
++ AccessJsonElement '{"lyrics":"Now' can you clap for the 'killers?\nGive' it up for them 'gangsters\nOne' time for the 'killers\nDouble' up for them 'gangsters\n\nWell' I wrote this for 'criminals\nBut' all of 'y'\''all' should listen at 'me\nNow' if you ever catch me 'snitchin'\''\nJust' haul off and slap 'me\n\nThey' on the other 'team\n\"Let'\''s' 'rumble,\"' is my thoughts 'exactly\nThey' work for 'gangsters\nAnd' they whacked Fred Hampton 'Jr.'\''s' 'pappy\n\nAy' playboy, pop ''\''em' with a pistol and get 'executed\nAy' mama, murder ''\''em' with missiles and you get 'saluted\nGo' ''\''head' and gank em for a grand, 'it'\''s' DNA 'computed\nBut' bankers bathe in the Bahamas off of billions 'looted\n\nNow' can you 'clap?\nNow' can you 'clap?\n\nNow' can you clap for them 'killers?\nGive' it up for them 'gangsters\nOne' time for the 'killers\nDouble' up for them 'gangsters\n\nWell' I wrote this for 'criminals\nBut' they the ones who wrote the 'laws\nThey' 'ain'\''t' on TV 'gettin'\''' 'arrested\nAll' up in their 'draws\n\nThey' stick their hands up 'politicians\nMake' ''\''em' move their 'jaws\nAnd' they be starving folks for 'bread\nUntil' their breath 'pause\n\nAy' take a memo Moneypenny, say the deed is 'done\nAnd' you can bcc DC and say our leaders 'won\nBut' first we fax the photograph of the opponents 'son\nAdjust' the image, ''\''cause' 'it'\''s' hard to see the gag and 'gun\n\nNow' can you 'clap?\nNow' can you 'clap?\nNow' can you 'clap?\nNow' can you 'clap?\n\nNow' can you clap for them 'killers?\nGive' it up for them 'gangsters\nOne' time for the 'killers\nDouble' up for them 'gangsters\n\nWell' I wrote this for 'gangsters\nWhile' I sprinted through your 'backyard\nNot' for them Coppola criminals, they just act 'hard\nTony' Montana had a stylist and a SAG 'card\nWhen' he reloaded slaves forgot they had back 'scars\n\nAy,' M-M-Mister DeNiro what kind of gun is 'that?\nCan' you look more like a 'menace?\nTake' two, now run it 'back\nAy' s-s-so what Scorsese, got all them money 'stacks\nLong' as his lens never looks at the real 'maniacs\n\nClap' for them 'killers\nGive' it up for them 'gangsters\nOne' time for the 'killers\nDouble' up for them 'gangsters\n\nCan' you clap for them 'killers?\nGive' it up for them 'gangsters\nOne' time for the 'killers\nDouble' up for them 'gangsters"}' lyrics
+ lyrics=
+ [[ '' == '' ]]
+ echo 'Error: no lyrics found!'
Error: no lyrics found!
+ return 1
+ exit 1
@Hickory420
Copy link
Author

This applies to any artist and song...

@alexanderepstein
Copy link
Owner

Looks like the lyrics extraction is failing, will have to look into this. Thanks for the heads up 👍

@stale
Copy link

stale bot commented Apr 29, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the Stale label Apr 29, 2020
@stale
Copy link

stale bot commented May 4, 2020

This issue has been automatically closed because it has been inactive for 30 days.

@stale stale bot closed this as completed May 4, 2020
@stale stale bot removed the Stale label May 5, 2020
@stale
Copy link

stale bot commented May 30, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the Stale label May 30, 2020
@stale
Copy link

stale bot commented Jun 5, 2020

This issue has been automatically closed because it has been inactive for 30 days.

@stale stale bot closed this as completed Jun 5, 2020
@stale stale bot removed the Stale label Jun 6, 2020
@stale
Copy link

stale bot commented Jul 3, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the Stale label Jul 3, 2020
@stale
Copy link

stale bot commented Jul 11, 2020

This issue has been automatically closed because it has been inactive for 30 days.

@stale
Copy link

stale bot commented Aug 16, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the Stale label Aug 16, 2020
@stale
Copy link

stale bot commented Aug 22, 2020

This issue has been automatically closed because it has been inactive for 30 days.

@stale stale bot closed this as completed Aug 22, 2020
@stale stale bot removed the Stale label Aug 26, 2020
@stale
Copy link

stale bot commented Sep 20, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the Stale label Sep 20, 2020
@stale
Copy link

stale bot commented Oct 4, 2020

This issue has been automatically closed because it has been inactive for 30 days.

@stale stale bot closed this as completed Oct 4, 2020
@stale stale bot removed the Stale label Oct 4, 2020
@navanchauhan
Copy link
Contributor

I think the API is rate limited. I ran the script once and it successfully printed the lyrics, but instantly running it again gave the error

Repository owner deleted a comment from H4wk-eye Feb 21, 2024
Repository owner deleted a comment Feb 26, 2024
Repository owner deleted a comment Feb 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants
@alexanderepstein @Hickory420 @navanchauhan and others