Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Lyrics Grabber Feedback & Discussion (Read 256988 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Lyrics Grabber Feedback & Discussion

Reply #100
Thank you very much for implementing the silent tagging!

This pythonscripting is a kewl thing. Python is very powerfull. Maybe one day in the future your component could be named advanced info grabber! (didn't see the SDK, but am curious to what it beholds.)

Lyrics Grabber Feedback & Discussion

Reply #101
Woah, I've taken a look at the Python code and I'm pleasantly surprised to find you've searched for lyrics with Google. This gives me hope for letssingit.com.

Lyrics on letssingit.com have some kind of salt/hash/something on the end of their urls, like this: http://artists.letssingit.com/3-doors-down...out-you-tcf3wh7, which makes a manual insertion impossible. As far as I'm concerned, I don't think they have an API - I didn't get any answers trying to open a thread, and I've tried looking around on the site.

Using Google with a search for "site:letssingit.com ["%artist%" ]["%title%"]" has sufficed so far, "http://www.google.no/search?q=site%3Aletssingit.com'+[%artist%+][%title%]", which returns results as simple as this: "3 Doors Down - Here Without You Lyrics if lyrics are found.

The main reason I like letssingit.com is because they have more Scandinavian lyrics than other pages I've seen.

Lyrics Grabber Feedback & Discussion

Reply #102
foo_grabber_python 0.1.7 Alpha and foo_lyricsgrabber 0.3.0.3 Alpha is released for alpha testers:
Enter

Make sure you have read the Wiki if you want foo_grabber_python to work.

Major Changes:
foo_lyrics_grabber:
FIX: Lyrics Grabber refused to query for lyrics while "skip tracks which contain lyric field already" is checked
FIX: Crash while "quite mode" is set
ADD: Splitter support to tagger dialog


foo_grabber_python:
FIX: Charset is wrong in AZLyrics.py. (Should be windows-1252, was latin-1)
ADD: new source: LyrDB.py
ADD: new sources for LRC lyrics: Lyricist(LRC).py TTPlayer(LRC).py (These souces are mainly for Chinese and Japanese lyricists)
ADD: Support expat, xml module

Lyrics Grabber Feedback & Discussion

Reply #103
It's cool that you added DarkLyrics too foo_grabber_python but it doesn't work properly yet. I tried some songs which are available on darklyrics but the plugin didn't find them.
Actually I didn't find any lyrics using foo_grabber_python

Lyrics Grabber Feedback & Discussion

Reply #104
Python grabber doesn't work here too, fb2k 0.9.6.2b3 on vista, i tried with smoke on the water, all python providers returned "failed".
I would like also to make a feature request: since this plugin will support .LRC files, can the plugin automatically choose the proper tag without editing the preferences, for example send LRC to %lyrics% while normal lyrics to %unsynced lyrics%? I personally keep two tags because Ipod reads only %unsynced lyrics%

Lyrics Grabber Feedback & Discussion

Reply #105
[a href="http://img230.imageshack.us/my.php?image=lukysv6.png" target="_blank"]
I'll look into it though.
A known problem is that username contains non-ascii character or Lib/ folder is not in grabber_python/
I'll fix the first problem.

Lyrics Grabber Feedback & Discussion

Reply #106
in the archive (python25.zip) there are compiled scripts for xml parsing for ex.
can we somehow use them (like html2text)?
the purpose is webservices

i've never written a python script but i just may give it a go, if i don't misunderstood of course

Lyrics Grabber Feedback & Discussion

Reply #107
Quote
in the archive (python25.zip) there are compiled scripts for xml parsing for ex.
can we somehow use them (like html2text)?
the purpose is webservices

Actually, they're compiled scripts of python standard library, and the python25.zip is added to sys.path already, so you can import them, as you like.
If you are willing to use 3rd-party libraries, you can also put them in grabber/Lib/ folder.

Notes:
  • The python25.zip contains most of libraries included in python windows distribution, however, some libs, such as sqlite3, ctypes, are not included in that archive.
  • .pyd files is important, you know, some modules also requires these python extensions, so put them under Lib/ if required (Now there's only _socket.pyd, pyexpat,pyd, unicodedata.pyd).
  • I may change a lot about the sys.path during alpha test, so notice my incoming notes.... 

Lyrics Grabber Feedback & Discussion

Reply #108
ok thanks, i'll try something, and as i thought this is going beyond lyrics grabbing

Lyrics Grabber Feedback & Discussion

Reply #109
Kudo's for the first person that is able to grab some cool other stuff from webpages then lyrics. Some things are usefull for in comment-field (and then combine with foo_textdisplay ^^.)

Or... maybe, just maybe, is this thing going to be able to grab genre from last.fm? (a much requested feature)

Request: tagfield-support for other fields then lyrics in a non-hackish way

Lyrics Grabber Feedback & Discussion

Reply #110
What about embedding album art? The current system of Album Art Downloader + mp3tag is rather long winded IMO... (sorry if this has been asked about before in this thread!)

Lyrics Grabber Feedback & Discussion

Reply #111
can it save the lyrics in a file, somewhere on a main drive, instead of writing in to the tags?


like, a lyrics.db file which contains all the lyrics that are used in the songs, it gets bigger as more lyrics are added, but it stays away from the files and the tags?

thx in advance

Lyrics Grabber Feedback & Discussion

Reply #112
Quote
Request: tagfield-support for other fields then lyrics in a non-hackish way
Now it's planned, but the negative effect is that it's a bit harder to write scripts. (return a dict of a list of a two-element tuple(meta, value))
like this:
Code: [Select]
...
def Query(self, handles, status, abort):
result = {}
for handle in handles:
metas = []
...
metas.append(grabber.opt.LYRIC_FIELD_NAME, "blah"))
...
metas.append(("COMMENT","blah"))
...
result[handle] = metas
continue
return result
...


Quote
What about embedding album art?
foobar2000 SDK doesn't include album art write support, so at least it's not possible to implement in a comfortable way.


Quote
can it save the lyrics in a file, somewhere on a main drive, instead of writing in to the tags?
like, a lyrics.db file which contains all the lyrics that are used in the songs
Saving lyrics to files is now planned, but I haven't seen any advantages of saving them into database.
Yes its easy to save them into database, however, is there anyway easy to load or show them?

Lyrics Grabber Feedback & Discussion

Reply #113
foo_lyricsgrabber 0.3.0.4 Alpha and foo_grabber_python 0.1.9 Alpha is now released for alpha testers. Enter
Installation guide is now included in foo_grabber_python archive.
If you're using foo_grabber_python, you should also update foo_lyricsgrabber becase foo_grabber_python is highly depend on foo_lyricsgrabber's services

Major changes:
foo_lyricsgrabber:
ADD: Commandline handler (still working in progress).

foo_grabber_python:
FIX: Add support for non-ascii path
FIX: A bug which may crash due to wrong if statement
CHG: Folder structure chagned (was grabber_python, now is pygrabber)
CHG: All scripts now included traceback information
CHG: Critical error message is now showed as popup message
ADD: LeosLyrics.py (only exact match)
ADD: Customizable library path and scripts path


More information about new commandline handler:
/grabber_conf                  Bring up configration window of foo_grabber_python
/grabber_exec:name=providername <file1> [<file2> <file3> ...]                Start a new query using provider whose name is "name", for example:
Code: [Select]
foobar2000.exe /grabber_exec:name="Lyrics Plugin" file1, file2, file3, file3
foobar2000.exe /grabber_exec:name="Python/Dark Lyrics" file1, file2

Lyrics Grabber Feedback & Discussion

Reply #114
It crashes every time I try to do anything in the Python config window (i.e. add a path to the scripts). What should I report?

Lyrics Grabber Feedback & Discussion

Reply #115
Quote
It crashes every time I try to do anything in the Python config window (i.e. add a path to the scripts). What should I report?

Crash log, of course.

Lyrics Grabber Feedback & Discussion

Reply #116
Code: [Select]
Illegal operation:
Code: C0000005h, flags: 00000000h, address: 0118914Eh
Access violation, operation: read, address: FFFFFFC0h
Call path:
entry=>app_mainloop
Code bytes (0118914Eh):
0118910Eh:  0C 8B 58 0C 8B 4D 08 69 DB A8 00 00 00 8B 51 24
0118911Eh:  03 5A 2C 8D 44 24 24 50 C7 44 24 3C 00 00 00 00
0118912Eh:  FF 15 9C C1 1B 01 8B 0D 00 C5 1C 01 68 CA 00 00
0118913Eh:  00 51 FF 15 7C C1 1B 01 8B 3D 80 C1 1B 01 33 D2
0118914Eh:  39 53 68 8B F0 0F 94 C2 89 74 24 10 52 68 08 80
0118915Eh:  00 00 56 FF D7 33 C0 39 83 84 00 00 00 0F 94 C0
0118916Eh:  50 68 09 80 00 00 56 FF D7 8D 74 24 20 8D 44 24
0118917Eh:  10 E8 AC 02 00 00 8B 4D 08 8B 51 04 8B 7C 24 28
Code bytes (0118914Eh):
0118910Eh:  0C 8B 58 0C 8B 4D 08 69 DB A8 00 00 00 8B 51 24
0118911Eh:  03 5A 2C 8D 44 24 24 50 C7 44 24 3C 00 00 00 00
0118912Eh:  FF 15 9C C1 1B 01 8B 0D 00 C5 1C 01 68 CA 00 00
0118913Eh:  00 51 FF 15 7C C1 1B 01 8B 3D 80 C1 1B 01 33 D2
0118914Eh:  39 53 68 8B F0 0F 94 C2 89 74 24 10 52 68 08 80
0118915Eh:  00 00 56 FF D7 33 C0 39 83 84 00 00 00 0F 94 C0
0118916Eh:  50 68 09 80 00 00 56 FF D7 8D 74 24 20 8D 44 24
0118917Eh:  10 E8 AC 02 00 00 8B 4D 08 8B 51 04 8B 7C 24 28
Registers:
EAX: 0058069E, EBX: FFFFFF58, ECX: 0012F5C4, EDX: 00000000
ESI: 01209390, EDI: 7E37D2C4, EBP: 18247C83, ESP: 18247C8B
Crash location: "foo_grabber_python", loaded at 01180000h - 011D7000h
Symbol: "initgrabber" (+000049FEh)

Loaded modules:
foobar2000   loaded at 00400000h - 00539000h
ntdll loaded at 7C900000h - 7C9B0000h
kernel32 loaded at 7C800000h - 7C8F8000h
COMCTL32 loaded at 773C0000h - 774C3000h
msvcrt   loaded at 77C00000h - 77C58000h
ADVAPI32 loaded at 77DC0000h - 77E6C000h
RPCRT4   loaded at 77E70000h - 77F02000h
Secur32   loaded at 77FE0000h - 77FF1000h
GDI32 loaded at 77F10000h - 77F59000h
USER32   loaded at 7E360000h - 7E3F1000h
SHLWAPI   loaded at 77F60000h - 77FD6000h
SHELL32   loaded at 7C9C0000h - 7D1DB000h
ole32 loaded at 774D0000h - 7760D000h
shared   loaded at 10000000h - 1002A000h
UxTheme   loaded at 5B260000h - 5B298000h
COMDLG32 loaded at 76380000h - 763C9000h
IMM32 loaded at 76360000h - 7637D000h
LPK   loaded at 62F00000h - 62F09000h
USP10 loaded at 75540000h - 755AB000h
mzvkbd   loaded at 6D710000h - 6D723000h
PSAPI loaded at 76BE0000h - 76BEB000h
mzvkbd3   loaded at 6D730000h - 6D743000h
raphook   loaded at 00A90000h - 00AD4000h
AM30400   loaded at 00B00000h - 00B0C000h
ws2_32   loaded at 71A90000h - 71AA7000h
WS2HELP   loaded at 71A80000h - 71A88000h
msctfime loaded at 75310000h - 7533E000h
foo_playcount loaded at 00B80000h - 00BAA000h
foo_albumlist loaded at 00BD0000h - 00C3B000h
foo_uie_trackinfo_mod loaded at 00C60000h - 00CB6000h
MSVCP80   loaded at 7C420000h - 7C4A7000h
MSVCR80   loaded at 78130000h - 781CB000h
gdiplus   loaded at 4EBE0000h - 4ED86000h
foo_abx   loaded at 00CF0000h - 00D21000h
foo_freedb2_fix   loaded at 00D50000h - 00D65000h
foo_menu_addons   loaded at 00D90000h - 00DED000h
libmmd   loaded at 00E00000h - 010B1000h
foo_converter loaded at 010D0000h - 0113C000h
foo_dsp_vlevel   loaded at 01160000h - 0116B000h
foo_grabber_python   loaded at 01180000h - 011D7000h
python25 loaded at 1E000000h - 1E208000h
MSVCR71   loaded at 7C340000h - 7C396000h
foo_httpcontrol   loaded at 01310000h - 01352000h
WSOCK32   loaded at 71AB0000h - 71ABA000h
MPR   loaded at 71B00000h - 71B12000h
foo_uie_graphical_browser loaded at 01380000h - 01414000h
MSIMG32   loaded at 76350000h - 76355000h
foo_ui_std   loaded at 01430000h - 01504000h
foo_rgscan   loaded at 01530000h - 0158B000h
foo_infobox   loaded at 015B0000h - 015F0000h
foo_chronflow loaded at 01610000h - 01671000h
WINMM loaded at 76B20000h - 76B4E000h
OPENGL32 loaded at 5F220000h - 5F2EC000h
GLU32 loaded at 5FF90000h - 5FFB1000h
DDRAW loaded at 73720000h - 7376B000h
DCIMAN32 loaded at 73B80000h - 73B86000h
OLEAUT32 loaded at 77110000h - 7719B000h
foo_input_monkey loaded at 01FC0000h - 02009000h
foo_lyricsdb loaded at 02030000h - 0205F000h
WININET   loaded at 771A0000h - 7724A000h
CRYPT32   loaded at 77A70000h - 77B06000h
MSASN1   loaded at 77B10000h - 77B22000h
foo_uie_panel_splitter   loaded at 02080000h - 020CF000h
foo_managedWrapper   loaded at 02130000h - 021FA000h
mscoree   loaded at 79000000h - 79046000h
msvcm80   loaded at 7C4C0000h - 7C53D000h
mscorwks loaded at 79E70000h - 7A400000h
mscorlib.ni   loaded at 790C0000h - 79BB7000h
mscorjit loaded at 79060000h - 790BB000h
rsaenh   loaded at 68000000h - 68036000h
System.ni loaded at 7A440000h - 7ABC5000h
System.Drawing.ni loaded at 7ADE0000h - 7AF68000h
System.Windows.Forms.ni   loaded at 7AFD0000h - 7BBAD000h
xpsp2res loaded at 04850000h - 04B1D000h
dotnet_title loaded at 11000000h - 11014000h
foo_uie_vis_peakmeter_spectrum  loaded at 04F60000h - 04F9F000h
foo_out_asio loaded at 04FC0000h - 04FF7000h
foo_run   loaded at 05020000h - 0504E000h
foo_uie_vis_channel_spectrum loaded at 05070000h - 050AD000h
foo_ac3   loaded at 050D0000h - 050FB000h
foo_uie_albumlist loaded at 05120000h - 05163000h
foo_cdda loaded at 05190000h - 051D1000h
foo_freedb2   loaded at 05200000h - 05240000h
foo_history   loaded at 05260000h - 0527C000h
foo_dsp_std   loaded at 052A0000h - 052E8000h
foo_masstag   loaded at 05310000h - 05353000h
foo_uie_quicksearch   loaded at 05380000h - 053C6000h
foo_uie_elplaylist   loaded at 053F0000h - 05457000h
foo_lyricsgrabber loaded at 05480000h - 054E4000h
foo_input_std loaded at 05510000h - 0564C000h
foo_dsp_delta loaded at 05670000h - 0568E000h
foo_uie_trackinfo loaded at 056B0000h - 056DE000h
foo_ui_minilyrics loaded at 05700000h - 05720000h
foo_uie_lyrics   loaded at 05740000h - 0579D000h
foo_lastfm_radio loaded at 057C0000h - 05805000h
foo_uie_lyricist loaded at 05830000h - 0591A000h
foo_uie_playlists_dropdown   loaded at 05940000h - 05979000h
foo_dsp_mm   loaded at 059A0000h - 059E1000h
foo_popupplus loaded at 05A00000h - 05A89000h
RICHED20 loaded at 74DF0000h - 74E5D000h
foo_jesus loaded at 05AB0000h - 05ACC000h
foo_audioscrobbler   loaded at 05AE0000h - 05B10000h
foo_vis_shpeck   loaded at 05B30000h - 05B6E000h
foo_scheduler loaded at 05B90000h - 05BFF000h
POWRPROF loaded at 74A90000h - 74A98000h
foo_channel_mixer loaded at 05C20000h - 05C5B000h
foo_skip loaded at 05C70000h - 05C7C000h
MSVCR90   loaded at 78520000h - 785C3000h
foo_playlist_tree_mod loaded at 05CA0000h - 05D08000h
libmzsch360_000   loaded at 10400000h - 105D0000h
libmzgc360_000   loaded at 05D30000h - 05DD4000h
foo_fileops   loaded at 05E20000h - 05E66000h
foo_uie_vis_egoh loaded at 05E90000h - 05EAD000h
foo_ui_columns   loaded at 05EC0000h - 05FF2000h
foo_uie_wsh_panel loaded at 06020000h - 0604F000h
pshook   loaded at 08000000h - 08008000h
ctagent   loaded at 06410000h - 06417000h
mscms loaded at 73AF0000h - 73B05000h
WINSPOOL loaded at 72FC0000h - 72FE6000h
icm32 loaded at 58BE0000h - 58C21000h
SXS   loaded at 7E690000h - 7E740000h
CLBCATQ   loaded at 76FC0000h - 7703F000h
COMRes   loaded at 77040000h - 77107000h
VERSION   loaded at 77BF0000h - 77BF8000h
scrchpg   loaded at 6D8E0000h - 6D906000h
jscript   loaded at 75C20000h - 75C9D000h
klscav   loaded at 6D510000h - 6D51A000h
prremote loaded at 6D860000h - 6D875000h
prloader loaded at 6D810000h - 6D853000h
prkernel loaded at 6E360000h - 6E390000h
userenv   loaded at 769A0000h - 76A55000h
params   loaded at 6E240000h - 6E2BB000h
pxstub   loaded at 6E4B0000h - 6E4B9000h
tempfile loaded at 6E680000h - 6E686000h
mswsock   loaded at 71A30000h - 71A70000h
DNSAPI   loaded at 76F10000h - 76F37000h
iphlpapi loaded at 76D50000h - 76D69000h
hnetcfg   loaded at 698B0000h - 69908000h
wshtcpip loaded at 71A70000h - 71A78000h
MiniLyrics   loaded at 09660000h - 0984D000h
rasadhlp loaded at 76FB0000h - 76FB6000h
System.Xml.ni loaded at 637A0000h - 63CD6000h
ctasio   loaded at 0A450000h - 0A45E000h
ctosuser loaded at 0A460000h - 0A476000h
LvHook   loaded at 3AA00000h - 3AA42000h
RASAPI32 loaded at 76ED0000h - 76F0C000h
rasman   loaded at 76E80000h - 76E92000h
NETAPI32 loaded at 5BD50000h - 5BDA5000h
TAPI32   loaded at 76EA0000h - 76ECF000h
rtutils   loaded at 76E70000h - 76E7E000h
sensapi   loaded at 72290000h - 72295000h
urlmon   loaded at 7DF10000h - 7DFB2000h
IMAGEHLP loaded at 76C80000h - 76CA8000h
DBGHELP   loaded at 59C60000h - 59D01000h

Version info:
foobar2000 v0.9.6
UNICODE
Windows 5.1


Additional info:
ELPlaylist 0.6.3.0(beta)  (foo_uie_elplaylist)
Special file info box 2.0.3  (foo_infobox)
Egoh Spectrum analyser (uie) 1.1.2  (foo_uie_vis_egoh)
ASIO support 1.2.6  (foo_out_asio)
Menu Addons 0.4 (Intel SSE)  (foo_menu_addons)
Audioscrobbler 1.3.16  (foo_audioscrobbler)
VLevel 20080302.0  (foo_dsp_vlevel)
Columns UI 0.3.5.1  (foo_ui_columns)
CD Audio Decoder 2.1.3  (foo_cdda)
Lyrist foobar2000 Component 1.41 1.41  (foo_uie_lyricist)
ABX Comparator 1.3.3  (foo_abx)
LPCM <--> delta-PCM converter 0.1.1  (foo_dsp_delta)
Playlist Tree Mod Panel 3.0.6.0 [Jul 12 2008 - 23:39:03]  (foo_playlist_tree_mod)
Standard DSP Array 1.0  (foo_dsp_std)
Freedb2 characters fixer (masstagger addon) 0.02  (foo_freedb2_fix)
Run services 0.3.4  (foo_run)
History 0.2  (foo_history)
Standard Input Array 1.0  (foo_input_std)
Channel Spectrum panel 0.17.2  (foo_uie_vis_channel_spectrum)
WSH Panel (uie) 0.7.2  (foo_uie_wsh_panel)
Album list panel 0.2.3 beta  (foo_uie_albumlist)
Graphical Browser rev015  (foo_uie_graphical_browser)
File Operations 2.1.1  (foo_fileops)
Track info panel 0.8  (foo_uie_trackinfo)
Shpeck - Winamp vis plugins wrapper 0.3.0  (foo_vis_shpeck)
Lyric Show Panel 0.3.3.9 [Dec 12 2008 - 17:39:01]  (foo_uie_lyrics)
Album List 4.3  (foo_albumlist)
Monkey's Audio decoder 2.1.1  (foo_input_monkey)
Lyrics Grabber 0.3.0.4 Alpha  (foo_lyricsgrabber)
freedb Tagger 0.6  (foo_freedb2)
Scheduler 3.53  (foo_scheduler)
Autosave 0.0.2  (foo_jesus)
Playlists Dropdown 0.6 alpha 4  (foo_uie_playlists_dropdown)
HTTP Control 0.79  (foo_httpcontrol)
Last.fm Radio 0.5.2  (foo_lastfm_radio)
Quick Search Toolbar 2.8l  (foo_uie_quicksearch)
Default User Interface 0.9.5  (foo_ui_std)
foo_lyricsdb 0.0.7 beta 5  (foo_lyricsdb)
Panel Stack Splitter 0.3.6.2(alpha)  (foo_uie_panel_splitter)
Peakmeter Spectrum Visualisation 0.2.0.0 beta  (foo_uie_vis_peakmeter_spectrum)
Lyrics Grabber Dances With Python 0.1.9 Alpha  (foo_grabber_python)
Skip Track 1.0.0  (foo_skip)
foobar2000 core 0.9.6  (Core)
PopUp Plus 20080423  (foo_popupplus)
Chronial's Coverflow 0.3.0  (foo_chronflow)
AC3 decoder 0.7  (foo_ac3)
Channel Mixer 0.9.6.1  (foo_channel_mixer)
ReplayGain Scanner 2.0.8  (foo_rgscan)
foo_managedWrapper 0.4  (foo_managedWrapper)
Track info panel mod 0.8.0 beta [Jan  5 2007 - 13:36:12]  (foo_uie_trackinfo_mod)
Matrix Mixer 0.3  (foo_dsp_mm)
Masstagger 1.7.1  (foo_masstag)
Converter 1.2  (foo_converter)
Playback Statistics 2.1.7  (foo_playcount)

Lyrics Grabber Feedback & Discussion

Reply #117
hi, T.P Wang

i'm struggling with python and i need a little help with the scripts

first, i tried to change one of the scripts and it looks like this:

Code: [Select]
import urllib
from xml.dom import minidom
from grabber import LyricProviderBase

class last_fm_bio(LyricProviderBase):
    def GetName(self):
        return "last.fm bio summary"
   
    def GetVersion(self):
        return "0.1"
   
    def GetURL(self):
        return "http://ws.audioscrobbler.com/"
   
    def Query(self, handles, status, abort):
        result = []
       
        for handle in handles:
            status.Advance()
           
            if abort.Aborting():
                return result
           
            artist = handle.Format("[%artist%]")
           
            try:
                string = urllib.urlopen("http://ws.audioscrobbler.com/2.0/?method=artist.getinfo&artist=%s&api_key=032cdb2ecd03a8ba66e8d8f2a7c38e4e" % (urllib.quote(artist),)).read()    
doc = minidom.parseString(string)
                child = doc.getElementsByTagName("bio")[0]
                text = child.getElementsByTagName("summary")[0]
                lyric = text.childNodes[0].data.encode('utf-8')
result.append(lyric)
            except Exception, e:
                traceback.print_exc(file=sys.stdout)
                result.append('')
                continue
       
        return result

if __name__ == "__main__":
    LyricProviderInstance = last_fm_bio()
result is unfortunately "failed" and i don't get any output, to know where the mistake is
maybe with some command line arguments we could redirect output result from failure to file?

anyway, i tried the code in standalone python shell using this code:

Code: [Select]
import urllib.request
from xml.dom import minidom

string = urllib.request.urlopen('http://ws.audioscrobbler.com/2.0/?method=artist.getinfo&artist=Dead+can+dance&api_key=b25b959554ed76058ac220b7b2e0a026').read()
doc = minidom.parseString(string)
child = doc.getElementsByTagName("bio")[0]
text = child.getElementsByTagName("summary")[0]
lyric = text.childNodes[0].data.encode('utf-8')
print (lyric)
and the result is as expected:

Code: [Select]
>>> ================================ RESTART ================================
>>>
b'Dead Can Dance were originally based in Australia, formed in Melbourne in 1981 by Brendan Perry and was later joined by Lisa Gerrard. They disbanded in 1998, and temporarily reunited to do a highly successful world tour in 2005 with a view to recording another studio album together. But due to ongoing personal differences between Perry and Gerrard, Perry decided to finally put to rest any prospect of a future collaboration in order to concentrate on a solo career.  '
>>>
i've noticed that using python scripts i can't get any lyrics which do exist on dedicated sites (for ex. Air - Playground Love) so maybe it's something to do with my configuration
if not, my question is:
what am i doing wrong,
maybe some explanation about how script is working
and is there a way i could use the api_key without just putting it to requested url

then if everything is all right, using python grabber and putting the info in tags is just not elegant sometimes, so what are the chances we can use some variables to put requested info in, and than use it somehow in foobar panel
maybe extending lyrics show panel possibilities or just inventing other panel
requested info can be image, url, text...
what do you think?

Lyrics Grabber Feedback & Discussion

Reply #118
Python grabber doesn't work here too, fb2k 0.9.6.2b3 on vista, i tried with smoke on the water, all python providers returned "failed".

Still getting "failed" with python in the new version, I don't know what I'm doing wrong

Lyrics Grabber Feedback & Discussion

Reply #119
Hi there,
I am using Lyrics Grabber to sync lyrics to show them on my iPod touch 2g. However, although i've updated lyrics by Lyrics Grabber, they don't appear on my iPod. I've googled it, and found that to show them in ipod lyrics should be written to file itunes-styled. When i update lyrics on iTunes it works, but it doesn't have the sync ability. Is it possible to add itunes-styled lyric save to lyrics grabber?

Lyrics Grabber Feedback & Discussion

Reply #120
@elenhil:
Try to remove lyrics_grabber_provider.cfg in your foobar2000 profile folder.
I'll fix that later

@2E7AH:
Indentation of these two lines not seems to be right:
Code: [Select]
doc = minidom.parseString(string)
...
result.append(lyric)


Quote
maybe with some command line arguments we could redirect output result from failure to file?

One of python built-in functions is file(filename[, mode[, bufsize]]), so if you want to redirect failure to file, make use of that function like this:
Code: [Select]
except Exception, e:
       ...
       f = file('C:\errlog.log', 'w+')
       traceback.print_exc(file=f)
       f.close()
       ...


Quote
so what are the chances we can use some variables to put requested info in, and than use it somehow in foobar panel
maybe extending lyrics show panel possibilities or just inventing other panel
requested info can be image, url, text.

I'm also expecting someone to invent such a rich-text panel, it's beyond me.

@novembre:
Is there any message in the console, or, if there's any popup window?

Lyrics Grabber Feedback & Discussion

Reply #121
i don't understand: what about indentation, does it matter?

i've just pasted your posted script, and got this:

Code: [Select]
Traceback (most recent call last):
  File "C:\Program Files\foobar2000\pygrabber\scripts\bio_sum.py", line 30, in Query
    lyric = text.childNodes[0].data.encode('utf-8')
LookupError: no codec search functions registered: can't find encoding


EDIT: i just now read your comment about rich-text panel: are you sure?

Lyrics Grabber Feedback & Discussion

Reply #122
Quote
i don't understand: what about indentation, does it matter?

Here: http://diveintopython.org/getting_to_know_...nting_code.html

Quote
EDIT: i just now read your comment about rich-text panel: are you sure?

YES. I don't have any skills about that.

Quote
LookupError: no codec search functions registered: can't find encoding

I think there's something wrong in python25.zip or unicodedata.pyd, 'cause It's not possible to get this error if python25.zip/encodings is present.
I also upload the correction script here:
http://pastebin.com/m34abd744

Lyrics Grabber Feedback & Discussion

Reply #123
ok, thanks for the code, i already paste it correctly considering the indentation

maybe it is something with the paths because i can't get any script working either (nothing in console)
the install instructions have been changed so maybe something happened then
the folders in foobar profile folder (libs, scripts) are empty, just to mention

and can anybody confirm that the scripts are working?

Lyrics Grabber Feedback & Discussion

Reply #124
Try to remove lyrics_grabber_provider.cfg in your foobar2000 profile folder.
Done. Crashed again.

Code: [Select]
Illegal operation:
Code: C0000005h, flags: 00000000h, address: 05CE914Eh
Access violation, operation: read, address: FFFFFFC0h
Call path:
entry=>app_mainloop
Code bytes (05CE914Eh):
05CE910Eh:  0C 8B 58 0C 8B 4D 08 69 DB A8 00 00 00 8B 51 24
05CE911Eh:  03 5A 2C 8D 44 24 24 50 C7 44 24 3C 00 00 00 00
05CE912Eh:  FF 15 9C C1 D1 05 8B 0D 00 C5 D2 05 68 CA 00 00
05CE913Eh:  00 51 FF 15 7C C1 D1 05 8B 3D 80 C1 D1 05 33 D2
05CE914Eh:  39 53 68 8B F0 0F 94 C2 89 74 24 10 52 68 08 80
05CE915Eh:  00 00 56 FF D7 33 C0 39 83 84 00 00 00 0F 94 C0
05CE916Eh:  50 68 09 80 00 00 56 FF D7 8D 74 24 20 8D 44 24
05CE917Eh:  10 E8 AC 02 00 00 8B 4D 08 8B 51 04 8B 7C 24 28
Code bytes (05CE914Eh):
05CE910Eh:  0C 8B 58 0C 8B 4D 08 69 DB A8 00 00 00 8B 51 24
05CE911Eh:  03 5A 2C 8D 44 24 24 50 C7 44 24 3C 00 00 00 00
05CE912Eh:  FF 15 9C C1 D1 05 8B 0D 00 C5 D2 05 68 CA 00 00
05CE913Eh:  00 51 FF 15 7C C1 D1 05 8B 3D 80 C1 D1 05 33 D2
05CE914Eh:  39 53 68 8B F0 0F 94 C2 89 74 24 10 52 68 08 80
05CE915Eh:  00 00 56 FF D7 33 C0 39 83 84 00 00 00 0F 94 C0
05CE916Eh:  50 68 09 80 00 00 56 FF D7 8D 74 24 20 8D 44 24
05CE917Eh:  10 E8 AC 02 00 00 8B 4D 08 8B 51 04 8B 7C 24 28
Registers:
EAX: 19E2031B, EBX: FFFFFF58, ECX: 0012F5C4, EDX: 00000000
ESI: 05D688E8, EDI: 7E37D2C4, EBP: 18247C83, ESP: 18247C8B
Crash location: "foo_grabber_python", loaded at 05CE0000h - 05D37000h
Symbol: "initgrabber" (+000049FEh)

Loaded modules:
foobar2000                      loaded at 00400000h - 00539000h
ntdll                            loaded at 7C900000h - 7C9B0000h
kernel32                        loaded at 7C800000h - 7C8F8000h
COMCTL32                        loaded at 773C0000h - 774C3000h
msvcrt                          loaded at 77C00000h - 77C58000h
ADVAPI32                        loaded at 77DC0000h - 77E6C000h
RPCRT4                          loaded at 77E70000h - 77F02000h
Secur32                          loaded at 77FE0000h - 77FF1000h
GDI32                            loaded at 77F10000h - 77F59000h
USER32                          loaded at 7E360000h - 7E3F1000h
SHLWAPI                          loaded at 77F60000h - 77FD6000h
SHELL32                          loaded at 7C9C0000h - 7D1DB000h
ole32                            loaded at 774D0000h - 7760D000h
shared                          loaded at 10000000h - 1002A000h
UxTheme                          loaded at 5B260000h - 5B298000h
COMDLG32                        loaded at 76380000h - 763C9000h
IMM32                            loaded at 76360000h - 7637D000h
LPK                              loaded at 62F00000h - 62F09000h
USP10                            loaded at 75540000h - 755AB000h
mzvkbd                          loaded at 6D710000h - 6D723000h
PSAPI                            loaded at 76BE0000h - 76BEB000h
mzvkbd3                          loaded at 6D730000h - 6D743000h
raphook                          loaded at 00A90000h - 00AD4000h
AM30400                          loaded at 00B00000h - 00B0C000h
ws2_32                          loaded at 71A90000h - 71AA7000h
WS2HELP                          loaded at 71A80000h - 71A88000h
msctfime                        loaded at 75310000h - 7533E000h
foo_uie_elplaylist              loaded at 00B80000h - 00BE7000h
gdiplus                          loaded at 4EBE0000h - 4ED86000h
foo_abx                          loaded at 00C20000h - 00C51000h
foo_lyricsgrabber                loaded at 00C80000h - 00CE4000h
OLEAUT32                        loaded at 77110000h - 7719B000h
foo_scheduler                    loaded at 00D10000h - 00D7F000h
POWRPROF                        loaded at 74A90000h - 74A98000h
WINMM                            loaded at 76B20000h - 76B4E000h
foo_masstag                      loaded at 00E20000h - 00E63000h
foo_freedb2                      loaded at 00E90000h - 00ED0000h
foo_out_asio                    loaded at 00EF0000h - 00F27000h
foo_run                          loaded at 00F50000h - 00F7E000h
foo_uie_trackinfo                loaded at 00FA0000h - 00FCE000h
foo_managedWrapper              loaded at 00FF0000h - 010BA000h
mscoree                          loaded at 79000000h - 79046000h
MSVCR80                          loaded at 78130000h - 781CB000h
MSVCP80                          loaded at 7C420000h - 7C4A7000h
msvcm80                          loaded at 7C4C0000h - 7C53D000h
mscorwks                        loaded at 79E70000h - 7A400000h
mscorlib.ni                      loaded at 790C0000h - 79BB7000h
mscorjit                        loaded at 79060000h - 790BB000h
rsaenh                          loaded at 68000000h - 68036000h
System.ni                        loaded at 7A440000h - 7ABC5000h
System.Drawing.ni                loaded at 7ADE0000h - 7AF68000h
System.Windows.Forms.ni          loaded at 7AFD0000h - 7BBAD000h
xpsp2res                        loaded at 03750000h - 03A1D000h
dotnet_title                    loaded at 11000000h - 11014000h
foo_playlist_tree_mod            loaded at 03E60000h - 03EC8000h
libmzsch360_000                  loaded at 10400000h - 105D0000h
WSOCK32                          loaded at 71AB0000h - 71ABA000h
libmzgc360_000                  loaded at 03EF0000h - 03F94000h
foo_audioscrobbler              loaded at 03FE0000h - 04010000h
foo_channel_mixer                loaded at 04030000h - 0406B000h
foo_freedb2_fix                  loaded at 04080000h - 04095000h
foo_infobox                      loaded at 040C0000h - 04100000h
foo_albumlist                    loaded at 04120000h - 0418B000h
foo_dsp_std                      loaded at 041B0000h - 041F8000h
foo_popupplus                    loaded at 04220000h - 042A9000h
RICHED20                        loaded at 74DF0000h - 74E5D000h
foo_uie_panel_splitter          loaded at 042D0000h - 0431F000h
foo_cdda                        loaded at 04340000h - 04381000h
foo_lastfm_radio                loaded at 043B0000h - 043F5000h
foo_uie_playlists_dropdown      loaded at 04420000h - 04459000h
foo_uie_graphical_browser        loaded at 04480000h - 04514000h
MSIMG32                          loaded at 76350000h - 76355000h
foo_uie_quicksearch              loaded at 04530000h - 04576000h
foo_dsp_vlevel                  loaded at 045A0000h - 045AB000h
foo_menu_addons                  loaded at 045C0000h - 0461D000h
libmmd                          loaded at 04630000h - 048E1000h
foo_uie_vis_egoh                loaded at 04900000h - 0491D000h
foo_converter                    loaded at 04930000h - 0499C000h
foo_uie_albumlist                loaded at 049C0000h - 04A03000h
foo_fileops                      loaded at 04A30000h - 04A76000h
foo_input_std                    loaded at 04AA0000h - 04BDC000h
foo_uie_vis_channel_spectrum    loaded at 04C00000h - 04C3D000h
foo_skip                        loaded at 04C60000h - 04C6C000h
MSVCR90                          loaded at 78520000h - 785C3000h
foo_jesus                        loaded at 04C90000h - 04CAC000h
foo_chronflow                    loaded at 04CC0000h - 04D21000h
OPENGL32                        loaded at 5F220000h - 5F2EC000h
GLU32                            loaded at 5FF90000h - 5FFB1000h
DDRAW                            loaded at 73720000h - 7376B000h
DCIMAN32                        loaded at 73B80000h - 73B86000h
foo_uie_lyricist                loaded at 055F0000h - 056DA000h
foo_ui_columns                  loaded at 05700000h - 05832000h
foo_uie_wsh_panel                loaded at 05860000h - 0588F000h
foo_uie_trackinfo_mod            loaded at 058E0000h - 05936000h
foo_vis_shpeck                  loaded at 05950000h - 0598E000h
foo_input_monkey                loaded at 059B0000h - 059F9000h
foo_uie_vis_peakmeter_spectrum  loaded at 05A20000h - 05A5F000h
foo_ac3                          loaded at 05A80000h - 05AAB000h
foo_playcount                    loaded at 05AD0000h - 05AFA000h
foo_ui_std                      loaded at 05B20000h - 05BF4000h
foo_dsp_delta                    loaded at 05C20000h - 05C3E000h
foo_uie_lyrics                  loaded at 05C60000h - 05CBD000h
WININET                          loaded at 771A0000h - 7724A000h
CRYPT32                          loaded at 77A70000h - 77B06000h
MSASN1                          loaded at 77B10000h - 77B22000h
foo_grabber_python              loaded at 05CE0000h - 05D37000h
python25                        loaded at 1E000000h - 1E208000h
MSVCR71                          loaded at 7C340000h - 7C396000h
foo_rgscan                      loaded at 05E90000h - 05EEB000h
foo_ui_minilyrics                loaded at 05F00000h - 05F20000h
foo_httpcontrol                  loaded at 05F40000h - 05F82000h
MPR                              loaded at 71B00000h - 71B12000h
foo_history                      loaded at 05FB0000h - 05FCC000h
foo_lyricsdb                    loaded at 05FF0000h - 0601F000h
foo_dsp_mm                      loaded at 06040000h - 06081000h
pshook                          loaded at 08000000h - 08008000h
ctagent                          loaded at 06520000h - 06527000h
mscms                            loaded at 73AF0000h - 73B05000h
WINSPOOL                        loaded at 72FC0000h - 72FE6000h
icm32                            loaded at 58BE0000h - 58C21000h
SXS                              loaded at 7E690000h - 7E740000h
CLBCATQ                          loaded at 76FC0000h - 7703F000h
COMRes                          loaded at 77040000h - 77107000h
VERSION                          loaded at 77BF0000h - 77BF8000h
scrchpg                          loaded at 6D8E0000h - 6D906000h
jscript                          loaded at 75C20000h - 75C9D000h
klscav                          loaded at 6D510000h - 6D51A000h
prremote                        loaded at 6D860000h - 6D875000h
prloader                        loaded at 6D810000h - 6D853000h
prkernel                        loaded at 6E360000h - 6E390000h
userenv                          loaded at 769A0000h - 76A55000h
params                          loaded at 6E240000h - 6E2BB000h
pxstub                          loaded at 6E4B0000h - 6E4B9000h
tempfile                        loaded at 6E680000h - 6E686000h
MiniLyrics                      loaded at 08E50000h - 0903D000h
mswsock                          loaded at 71A30000h - 71A70000h
DNSAPI                          loaded at 76F10000h - 76F37000h
iphlpapi                        loaded at 76D50000h - 76D69000h
System.Xml.ni                    loaded at 637A0000h - 63CD6000h
hnetcfg                          loaded at 698B0000h - 69908000h
wshtcpip                        loaded at 71A70000h - 71A78000h
rasadhlp                        loaded at 76FB0000h - 76FB6000h
ctasio                          loaded at 0A0E0000h - 0A0EE000h
ctosuser                        loaded at 0A0F0000h - 0A106000h
LvHook                          loaded at 3AA00000h - 3AA42000h
RASAPI32                        loaded at 76ED0000h - 76F0C000h
rasman                          loaded at 76E80000h - 76E92000h
NETAPI32                        loaded at 5BD50000h - 5BDA5000h
TAPI32                          loaded at 76EA0000h - 76ECF000h
rtutils                          loaded at 76E70000h - 76E7E000h
msv1_0                          loaded at 77C60000h - 77C84000h
sensapi                          loaded at 72290000h - 72295000h
urlmon                          loaded at 7DF10000h - 7DFB2000h
IMAGEHLP                        loaded at 76C80000h - 76CA8000h
DBGHELP                          loaded at 59C60000h - 59D01000h

Version info:
foobar2000 v0.9.6
UNICODE
Windows 5.1


Additional info:
CD Audio Decoder 2.1.3  (foo_cdda)
Playback Statistics 2.1.7  (foo_playcount)
ASIO support 1.2.6  (foo_out_asio)
PopUp Plus 20080423  (foo_popupplus)
Converter 1.2  (foo_converter)
ELPlaylist 0.6.3.0(beta)  (foo_uie_elplaylist)
Standard Input Array 1.0  (foo_input_std)
VLevel 20080302.0  (foo_dsp_vlevel)
Freedb2 characters fixer (masstagger addon) 0.02  (foo_freedb2_fix)
ReplayGain Scanner 2.0.8  (foo_rgscan)
Scheduler 3.53  (foo_scheduler)
Autosave 0.0.2  (foo_jesus)
Track info panel mod 0.8.0 beta [Jan  5 2007 - 13:36:12]  (foo_uie_trackinfo_mod)
Last.fm Radio 0.5.2  (foo_lastfm_radio)
Columns UI 0.3.5.1  (foo_ui_columns)
Playlist Tree Mod Panel 3.0.6.0 [Jul 12 2008 - 23:39:03]  (foo_playlist_tree_mod)
Chronial's Coverflow 0.3.0  (foo_chronflow)
LPCM <--> delta-PCM converter 0.1.1  (foo_dsp_delta)
Playlists Dropdown 0.6 alpha 4  (foo_uie_playlists_dropdown)
Monkey's Audio decoder 2.1.1  (foo_input_monkey)
Run services 0.3.4  (foo_run)
Album List 4.3  (foo_albumlist)
History 0.2  (foo_history)
Shpeck - Winamp vis plugins wrapper 0.3.0  (foo_vis_shpeck)
ABX Comparator 1.3.3  (foo_abx)
Graphical Browser rev015  (foo_uie_graphical_browser)
Matrix Mixer 0.3  (foo_dsp_mm)
Lyric Show Panel 0.3.3.9 [Dec 12 2008 - 17:39:01]  (foo_uie_lyrics)
freedb Tagger 0.6  (foo_freedb2)
Quick Search Toolbar 2.8l  (foo_uie_quicksearch)
Lyrics Grabber Dances With Python 0.1.9 Alpha  (foo_grabber_python)
WSH Panel (uie) 0.7.2  (foo_uie_wsh_panel)
Channel Mixer 0.9.6.1  (foo_channel_mixer)
Track info panel 0.8  (foo_uie_trackinfo)
Panel Stack Splitter 0.3.6.2(alpha)  (foo_uie_panel_splitter)
Peakmeter Spectrum Visualisation 0.2.0.0 beta  (foo_uie_vis_peakmeter_spectrum)
Lyrics Grabber 0.3.0.4 Alpha  (foo_lyricsgrabber)
foo_lyricsdb 0.0.7 beta 5  (foo_lyricsdb)
File Operations 2.1.1  (foo_fileops)
Masstagger 1.7.1  (foo_masstag)
Menu Addons 0.4 (Intel SSE)  (foo_menu_addons)
Skip Track 1.0.0  (foo_skip)
foo_managedWrapper 0.4  (foo_managedWrapper)
Audioscrobbler 1.3.16  (foo_audioscrobbler)
foobar2000 core 0.9.6  (Core)
HTTP Control 0.79  (foo_httpcontrol)
Egoh Spectrum analyser (uie) 1.1.2  (foo_uie_vis_egoh)
AC3 decoder 0.7  (foo_ac3)
Lyrist foobar2000 Component    1.41 1.41  (foo_uie_lyricist)
Default User Interface 0.9.5  (foo_ui_std)
Album list panel 0.2.3 beta  (foo_uie_albumlist)
Standard DSP Array 1.0  (foo_dsp_std)
Channel Spectrum panel 0.17.2  (foo_uie_vis_channel_spectrum)
Special file info box 2.0.3  (foo_infobox)