pax_global_header 0000666 0000000 0000000 00000000064 14042356110 0014506 g ustar 00root root 0000000 0000000 52 comment=18d41565f955028f9fcd2f6cc437f5f1cb717401
woob-18d41565f955028f9fcd2f6cc437f5f1cb717401-modules-lyricsdotcom/ 0000775 0000000 0000000 00000000000 14042356110 0023512 5 ustar 00root root 0000000 0000000 woob-18d41565f955028f9fcd2f6cc437f5f1cb717401-modules-lyricsdotcom/modules/ 0000775 0000000 0000000 00000000000 14042356110 0025162 5 ustar 00root root 0000000 0000000 woob-18d41565f955028f9fcd2f6cc437f5f1cb717401-modules-lyricsdotcom/modules/lyricsdotcom/ 0000775 0000000 0000000 00000000000 14042356110 0027675 5 ustar 00root root 0000000 0000000 woob-18d41565f955028f9fcd2f6cc437f5f1cb717401-modules-lyricsdotcom/modules/lyricsdotcom/__init__.py 0000664 0000000 0000000 00000001513 14042356110 0032006 0 ustar 00root root 0000000 0000000 # -*- coding: utf-8 -*-
# Copyright(C) 2016 Julien Veyssier
#
# This file is part of a woob module.
#
# This woob module is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This woob module is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this woob module. If not, see .
from .module import LyricsdotcomModule
__all__ = ['LyricsdotcomModule']
woob-18d41565f955028f9fcd2f6cc437f5f1cb717401-modules-lyricsdotcom/modules/lyricsdotcom/browser.py 0000664 0000000 0000000 00000003647 14042356110 0031744 0 ustar 00root root 0000000 0000000 # -*- coding: utf-8 -*-
# Copyright(C) 2016 Julien Veyssier
#
# This file is part of a woob module.
#
# This woob module is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This woob module is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this woob module. If not, see .
from woob.browser import PagesBrowser
from woob.browser.url import URL
from woob.browser.profiles import Firefox
from .pages import SearchPage, LyricsPage, ArtistPages
__all__ = ['LyricsdotcomBrowser']
class LyricsdotcomBrowser(PagesBrowser):
PROFILE = Firefox()
TIMEOUT = 30
BASEURL = 'http://www.lyrics.com'
search = URL('/serp.php\?st=(?P.*)&qtype=(?P1|2)',
SearchPage)
songLyrics = URL('/lyric/(?P\d*)',
LyricsPage)
artistsong = URL('/artist/(?P.*)', ArtistPages)
def iter_lyrics(self, criteria, pattern):
if criteria == 'song':
self.search.go(pattern=pattern, criteria=1)
assert self.search.is_here()
for song in self.page.iter_lyrics():
yield song
elif criteria == 'artist':
self.search.go(pattern=pattern, criteria=2)
assert self.search.is_here()
for artist in self.page.iter_artists():
for song in self.artistsong.go(id=artist.id).iter_lyrics():
yield song
def get_lyrics(self, id):
return self.songLyrics.go(id=id).get_lyrics()
woob-18d41565f955028f9fcd2f6cc437f5f1cb717401-modules-lyricsdotcom/modules/lyricsdotcom/favicon.png 0000664 0000000 0000000 00000004000 14042356110 0032022 0 ustar 00root root 0000000 0000000 PNG
IHDR @ @ iq bKGD pHYs tIME
IDATx{P~²r) eutщ1NcZo
chiN&u46:hjLxiJT
QEYn+ce-rqYMg_;^}s߷ckNb@ D " @ x8M>'(X."җq-@kPGXǥ}90GK%{+-eHc @"C;LLY*"f\t6Ui~dt6a-ٝt\;3Hv95AQiDepY/JZ#P1EypRrθQ?TtS|
.4q؏T&s
!1!1Dd V.-inSM e
ٻ~uH@g
e8 ""}1ٯx@"gCEb3_ܼR@OLθhԱDp{LFەcT}kk2l"3_`1Q}t=r?ħoG'P}d=cm--T
~e,'(2k{=g7gxv=V.Je} Y*pⰶz12ۻCmV!$~&zC.+ Ϧ0