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

Youtube API Resume From Interruption #85

Closed
stephen-huan opened this issue May 22, 2020 · 1 comment · Fixed by #96
Closed

Youtube API Resume From Interruption #85

stephen-huan opened this issue May 22, 2020 · 1 comment · Fixed by #96
Assignees
Labels
Milestone

Comments

@stephen-huan
Copy link
Contributor

Currently, it seems that the SQLite database is used only when HTML scraping, and not when the Youtube API is used.

Are there plans to check if a Youtube video has already been found for a Spotify song, and skip doing either a Youtube API query and/or skip a youtube-dl query, depending on whether the song is in songs.txt and whether a song already has a *.mp3 file associated with it?

Also, the songs.txt file is formatted strangely:
I'm not sure if it matters if the plan is to migrate to SQLite/some sort of structured database, but I thought I might as well point it out.

[ ( ' h t t p s : / / w w w . y o u t u b e . c o m / w a t c h ? v = S y T O u C W Q b D k ' ,   ' S l o w   S t a r t ' ,   ' c u t e   g i r l s   d o i n g   c u t e   t h i n g s ' ) ,   ( ' h t t p s : / / w w w . y o u t u b e . c o m / w a t c h ? v = 0 V b 3 p 3 A 2 5 H Y ' ,   ' P r e c i o u s   M e m o r i e s ~ ' ,   ' c u t e   g i r l s   d o i n g   c u t e   t h i n g s ' ) ,   ( ' h t t p s : / / w w w . y o u t u b e . c o m / w a t c h ? v = 9 A i w C o p a 8 B M ' ,   ' S h i n y ! ' ,   ' c u t e   g i r l s   d o i n g   c u t e   t h i n g s ' ) ,   ( ' h t t p s : / / w w w . y o u t u b e . c o m / w a t c h ? v = N W N 1 L S m r Y s A ' ,   ' F r o m   L e f t   t o   R i g h t ~ ' ,   ' c u t e   g i r l s   d o i n g   c u t e   t h i n g s ' ) ,   ( ' h t t p s : / / w w w . y o u t u b e . c o m / w a t c h ? v = g 9 n X Z Q I m r H E ' ,   ' S p e c i a l ~ ' ,   ' c u t e   g i r l s   d o i n g   c u t e   t h i n g s ' ) ,   ( ' h t t p s : / / w w w . y o u t u b e . c o m / w a t c h ? v = L - w i n T O q p c A ' ,   ' M a i n   H e r o i n e ' ,   ' c u t e   g i r l s   d o i n g   c u t e   t h i n g s ' ) ,   ( ' h t t p s : / / w w w . y o u t u b e . c o m / w a t c h ? v = g 9 n X Z Q I m r H E ' ,   ' P r e t t y ! ' ,   ' c u t e   g i r l s   d o i n g   c u t e   t h i n g s ' ) ,   ( ' h t t p s : / / w w w . y o u t u b e . c o m / w a t c h ? v = L n _ N e t z 9 U k M ' ,   ' Y e s ,   C h a n g e   M e ' ,   ' c u t e   g i r l s   d o i n g   c u t e   t h i n g s ' ) ,   ( ' h t t p s : / / w w w . y o u t u b e . c o m / w a t c h ? v = n u u u f g N s Z Q o ' ,   ' J u s t   a   D r e a m ' ,   ' c u t e   g i r l s   d o i n g   c u t e   t h i n g s ' ) ,   ( ' h t t p s : / / w w w . y o u t u b e . c o m / w a t c h ? v = r P 4 B S F u Z t j o ' ,   ' I n   a   S w i m s u i t ! ' ,   ' c u t e   g i r l s   d o i n g   c u t e   t h i n g s ' ) ,   ( ' h t t p s : / / w w w . y o u t u b e . c o m / w a t c h ? v = x y A - H 8 C l m 9 I ' ,   ' I n v e s t i g a t i o n ! ' ,   ' c u t e   g i r l s   d o i n g   c u t e   t h i n g s ' ) ,   ( ' h t t p s : / / w w w . y o u t u b e . c o m / w a t c h ? v = y S 4 7 h B F y i 4 c ' ,   ' F o u n d   I t ! ' ,   ' c u t e   g i r l s   d o i n g   c u t e   t h i n g s ' ) ,   ( ' h t t p s : / / w w w . y o u t u b e . c o m / w a t c h ? v = x t S - J M H q h 6 A ' ,   ' B a k a ! ' ,   ' c u t e   g i r l s   d o i n g   c u t e   t h i n g s ' ) ,   ( ' h t t p s : / / w w w . y o u t u b e . c o m / w a t c h ? v = Q P 2 0 O D w R b 4 k ' ,   ' L o u n g e ' ,   ' c u t e   g i r l s   d o i n g   c u t e   t h i n g s ' ) ,   ( ' h t t p s : / / w w w . y o u t u b e . c o m / w a t c h ? v = a t R 5 s u Z V v S Q ' ,   ' H i d e   a n d   S e e k ' ,   ' c u t e   g i r l s   d o i n g   c u t e   t h i n g s ' ) ,   ( ' h t t p s : / / w w w . y o u t u b e . c o m / w a t c h ? v = H Z - 4 a j L H R a Y ' ,   ' P e r f u m e ' ,   ' c u t e   g i r l s   d o i n g   c u t e   t h i n g s ' ) ,   ( ' h t t p s : / / w w w . y o u t u b e . c o m / w a t c h ? v = f - s L J f A a K L M ' ,   ' G o o d   D a y s ' ,   ' c u t e   g i r l s   d o i n g   c u t e   t h i n g s ' ) ,   ( ' h t t p s : / / w w w . y o u t u b e . c o m / w a t c h ? v = w c b w d 2 n m s J 8 ' ,   ' T r i u m p h ' ,   ' c u t e   g i r l s   d o i n g   c u t e   t h i n g s ' ) ,   ( ' h t t p s : / / w w w . y o u t u b e . c o m / w a t c h ? v = u o f p w t P M _ E Y ' ,   ' I n t i m a t e ' ,   ' c u t e   g i r l s   d o i n g   c u t e   t h i n g s ' ) ,   ( ' h t t p s : / / w w w . y o u t u b e . c o m / w a t c h ? v = Z O f e Q B A t I D c ' ,   ' E m e r a l d   E y e s ' ,   ' c u t e   g i r l s   d o i n g   c u t e   t h i n g s ' ) ,   ( ' h t t p s : / / w w w . y o u t u b e . c o m / w a t c h ? v = L C R 2 7 A - p A b s ' ,   ' C l o s e r ' ,   ' c u t e   g i r l s   d o i n g   c u t e   t h i n g s ' ) ,   ( ' h t t p s : / / w w w . y o u t u b e . c o m / w a t c h ? v = - r P _ p s c F a P E ' ,   ' E x c i t e d ! ' ,   ' c u t e   g i r l s   d o i n g   c u t e   t h i n g s ' ) ,   ( ' h t t p s : / / w w w . y o u t u b e . c o m / w a t c h ? v = O U S N 5 1 6 x N v A ' ,   " L e t ' s   G o ! " ,   ' c u t e   g i r l s   d o i n g   c u t e   t h i n g s ' ) ,   ( ' h t t p s : / / w w w . y o u t u b e . c o m / w a t c h ? v = c f 3 B W L 2 l g R I ' ,   ' T h i s   I s   F u n ! ' ,   ' c u t e   g i r l s   d o i n g   c u t e   t h i n g s ' ) ,   ( ' h t t p s : / / w w w . y o u t u b e . c o m / w a t c h ? v = S 0 s U 0 x k s O h I ' ,   " L o o k ,   I ' m   F l y i n g ! " ,   ' c u t e   g i r l s   d o i n g   c u t e   t h i n g s ' ) ,   ( ' h t t p s : / / w w w . y o u t u b e . c o m / w a t c h ? v = P x p 9 p d b - V n M ' ,   ' W h a t   a   L i v e l y   T r i b e ! ' ,   ' c u t e   g i r l s   d o i n g   c u t e   t h i n g s ' ) ,   ( ' h t t p s : / / w w w . y o u t u b e . c o m / w a t c h ? v = C u Y 0 9 C d H T 7 8 ' ,   ' F a r e w e l l ' ,   ' c u t e   g i r l s   d o i n g   c u t e   t h i n g s ' ) ]
@SathyaBhat
Copy link
Owner

Currently, it seems that the SQLite database is used only when HTML scraping, and not when the Youtube API is used.

oops, that is a bug. Didn't realize the API version is not getting cached. Will work to adding the songs fetched via API to cahce as well. There is plan to migrate all to SQLite (see #82 ). But thanks for raising this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants