QUOTE (2E7AH @ Oct 31 2009, 00:12)

Benji99, here is the script:
Click to view attachmentI've tested it by tagging some files with title/artist present on site, and it worked. If you find any problems post
What I've learned?
- Japanese glyphs have many encodings
- some sites don't like python
- even more about Unicode

Huge thanks for this script!!
It works really well, except for a couple small bugs, if you have some free time, ...

1st bug:
Certain track titles make the script crash.
CODE
foo_grabber_python: Traceback (most recent call last):
File "I:\Program Files\foobar2000\pygrabber\scripts\goo.py", line 63, in Query
raw_title = handle.Format('[%title%]').decode("utf8").encode("euc_jp")
UnicodeEncodeError: 'euc_jp' codec can't encode character u'\uff5e' in position 13: illegal multibyte sequence
This seemingly happens when a track has the '~' character in the title,
A couple examples:
Track title: HIGH G.K LOW ~ハジケロ~
Artist: GreeeeN
Track title: 手紙 ~君たちへ~
Artist: GreeeeN
Although, this one works:
Track title: 島唄~ウチナーグチ・ヴァージョン~
Artist: THE BOOM
2nd bug, The script seems to have trouble finding tracks where there's a large amount of tracks with the same name
For example:
Track title: YOU
Artist: サザンオールスターズ
Track title: 海
Artist: サザンオールスターズ
I know how this 2nd bug can be fixed I think, I found out that the site has a more advanced search function:
http://music.goo.ne.jp/lyric/db.phpThere you can enter both the artist (アーティスト名) and track title (曲名)
If you can modify the script to use that page instead, it would make it really accurate!
Huge thanks again!
Sebastien