2009-06-29, 23:58
I need to figure out what the person who wrote the AllMusic scraper's intent is in the custom function "GetDiscography", thinking i might be missing something in my Library
it seems to me that the final nested statement will delete the info in $$2.... but what if there are no & in 2 to begin with? then what happens is the discography ends up empty and this function returns nothing (even if albums are found. (.+) indicates there needs to be at least one charachter but for some reason it still clears 2)
Maybe there's something i'm not understanding about the Scraper process.
(I do know though, that in my code this check for ampersands is unneccessary as i take all precautions on the ampersands to make things parseable)
EDIT: Nevermind, i just realized that i was making "\1" the default for output.. that's why it was deleting whether or not there was anything there
Code:
<GetDiscography dest="5">
<RegExp input="$$2$$3" output="<details>\1</details>" dest="5">
<RegExp input="$$1" output="<album><year>\1</year><title>\3</title><label>\4</label></album>" dest="2">
<expression repeat="yes" clear="yes" noclean="1,3,4">sorted-cell">([0-9]+)</td><td[^>]*>(<a href=[^>]*><img [^>]*/></a>|[^<]*)?</td><td[^>]*><a href=[^>]*>([^<]*)</a></td><td[^<]*</td><td[^>]*>([^<]+)</td></expression>
</RegExp>
<RegExp input="$$2" output="\1&amp;\2" dest="3">
<expression noclean="1,2" repeat="yes">(.*?)&(.+)</expression>
</RegExp>
[b]<RegExp input="$$3" output="" dest="2">
<expression>(.+)</expression>
</RegExp>[/b]
<expression noclean="1"></expression>
</RegExp>
</GetDiscography>
it seems to me that the final nested statement will delete the info in $$2.... but what if there are no & in 2 to begin with? then what happens is the discography ends up empty and this function returns nothing (even if albums are found. (.+) indicates there needs to be at least one charachter but for some reason it still clears 2)
Maybe there's something i'm not understanding about the Scraper process.
(I do know though, that in my code this check for ampersands is unneccessary as i take all precautions on the ampersands to make things parseable)
EDIT: Nevermind, i just realized that i was making "\1" the default for output.. that's why it was deleting whether or not there was anything there