Hey,
just to complete Kirill's words, I actually had a whole branch for
this, named "fix-fetch-lyrics" (hoz original), that you can see at
https://github.com/multani/sonata/tree/fix-fetch-lyrics. It also
contains several refactoring before the real fix.
No idea for the capitalization rule though. Considering the state of
Sonata and the eventual evolution of LyricsWiki since the creation of
the plugin, I won't be surprised the "logical" rules had evolved since.
Jon
On Wed, 27 Apr 2011 18:46:17 +0300, KL-7 <[email protected]> wrote:
Hi,
I believe this one [1] will do the trick.
Lazaros, I suggest you to look through commits in multani's [2] and
my
[3] repos. You might find some useful fixes there.
And I wonder how things are going with sonata. I don't see much
activity of Paco's team on codingteam. Did they move the repo
somewhere else or finally decide against resurrecting sonata project?
On Wed, Apr 27, 2011 at 2:39 PM, Lazaros Koromilas wrote:
On Tue, Apr 26, 2011 at 7:35 PM, KL-7 wrote:
> Hi,
>
> Something really strange happened with their markup lately, so
thank you for
> sharing your patch. Though, I used this one for myself. It avoids
splitting
> string with the tag that contains simultaneously escaped '' as it
looks a bit unstable for me.
Yep! This seems much better, thanks ;)
Another thing that needs attention is the capitalization rules, for
instance
for the song "Orchestral Manoeuvres In The Dark - She's Leaving"
sonata
will get the page:
http://lyrics.wikia.com/index.php?title=Orchestral%20Manoeuvres%20In%20The%20Dark:She%27S%20Leaving&action=edit
[6]
whereas the logical would be:
http://lyrics.wikia.com/index.php?title=Orchestral%20Manoeuvres%20In%20The%20Dark:She%27s%20Leaving&action=edit
[7]
where the lyrics actually exist.
> On Tue, Apr 26, 2011 at 7:08 PM, Lazaros Koromilas
> wrote:
>>
>> Lyrics fetching was not functional lately,
>> some changes in the markup apparently.
>> This patch fixes it.
>>
>> diff --git a/sonata/lyricwiki.py b/sonata/lyricwiki.py
>> index 0cd07fc..d4055c1 100644
>> --- a/sonata/lyricwiki.py
>> +++ b/sonata/lyricwiki.py
>> @@ -42,10 +42,9 @@ class LyricWiki(object):
>> if content[:len(redir_tag)].lower() ==
redir_tag:
>> addr =
>> "http://lyricwiki.org/index.php?title=%s&action=edit [9]" %
>> urllib.quote(content.split("[[")[1].split("]]")[0])
>> lyricpage = urllib.urlopen(addr).read()
>> - content = re.split("]*>",
>> lyricpage)[1].split("")[0]
>> - content = content.strip()
>> - lyrics =
>> content.split("")[1].split("")[0]
>> - if lyrics.strip() != "":
>> + lyrics = re.split("",
>> lyricpage)[1].split("")[0]
>> + if lyrics.find("PUT LYRICS HERE") == -1:
>> + lyrics = lyrics.strip()
>> lyrics = misc.unescape_html(lyrics)
>> lyrics = misc.wiki_to_html(lyrics)
>> lyrics = lyrics.decode("utf-8")
>> _______________________________________________
>> Sonata-users mailing list
>> [email protected] [10]
>> https://lists.berlios.de/mailman/listinfo/sonata-users [11]
>
>
>
> --
> Kirill
>
>
> _______________________________________________
> Sonata-users mailing list
> [email protected] [12]
> https://lists.berlios.de/mailman/listinfo/sonata-users [13]
>
>
_______________________________________________
Sonata-users mailing list
[email protected] [14]
https://lists.berlios.de/mailman/listinfo/sonata-users [15]
--
Kirill
_______________________________________________
Sonata-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/sonata-users