ScraperXML (Open Source XML Web Scraper C# Library) please help verify my work... - Printable Version
+- XBMC Community Forum (http://forum.xbmc.org)
+-- Forum: Development (/forumdisplay.php?fid=32)
+--- Forum: Scraper Development (/forumdisplay.php?fid=60)
+--- Thread: ScraperXML (Open Source XML Web Scraper C# Library) please help verify my work... (/showthread.php?tid=50055)
- Nicezia - 2009-07-07 20:15
xyber Wrote:Thanks. I'll just popup something incase it dalays too long. Living in SA gives me the "benefit" of seeing what users will experience under the worse internet connection conditions.
Yeah cause i do most of my coding and testing without intenet access. so i renamed it to keep it from trying to connect to the net.
- ultrabrutal - 2009-07-07 21:11
Nicezia Wrote:What part of your Code is crashing it? what exactley is your scraper doing when it has this problem?
This is when opening your application when my scraper is in the folder. I never get to press any buttons myself
Now with the old version I can only it just fine and I can test the functions - except GetDetails which fails if I use nested regex (posters and fanart with more than one regex). See my other thread about this problem:
- Nicezia - 2009-07-07 21:27
ScraperXML shouldn't have any problems with nested RegExp
its really hard for me to find what's causing a problem when i don't have a copy of the object that the problem is with. Which is why i suggest using scraperXMLEditor, as its based on the same code, it will aid you in making a scraper fully compatible with both XBMC AND scraperXML.
however without knowing what your scraper looks like what it does or what it is about it that ScraperXML doesn't like, there's not a thing i can do to help... you're just not supplying enough info
one thing i can see though is that the problem is happening when trying to retrieve settings from the scraper... There is no exception handling in the ScraperParser when getting settings. It expects the Scraper to conform. Only thing that has been changed in settings is the option="hidden" added. Other than that the code in cSharp is a direct reflection of the old VB code.
At least let me see your "GetSettings" function so i can see what the prob is.
also have you loaded this in XBMC does it show your settings ok?
- ultrabrutal - 2009-07-07 21:41
Well all of the scraper seems to work in XBMC. I'm having some problems with fanart in GetDetails, but that's it (debugging XBMC right now to find cause). Do you messenger? Might be easier to talk there?
- Nicezia - 2009-07-07 21:48
ultrabrutal Wrote:Well all of the scraper seems to work in XBMC. I'm having some problems with fanart in GetDetails, but that's it (debugging XBMC right now to find cause). Do you messenger? Might be easier to talk there?
- ultrabrutal - 2009-07-07 21:52
I've added: firstname.lastname@example.org in messenger. Should work I think? What about irc?
- Nicezia - 2009-07-07 21:58
- Nicezia - 2009-07-07 23:47
For public knowledge the problem was that there was no default on the text values...
all settings MUST have a default setting (for initial value when adjusting settings) if you don't want anything set initially set
this will be fixed in the next version so that default is empty if not set
- ultrabrutal - 2009-07-08 08:14
Hehe, I didn't want to supply my account info with the scraper
- xyber - 2009-07-08 14:25
Nicezia, I've added you on gtalk. Request from plyoung will be me.
I found some IO errors which seems to be comming from the logging stuff, but I'm still investigating this. Seems like LogFileInfo.Create(); can keep FileStream LogFile = new FileStream(LogFilePath, FileMode.Append); from opening the file in some cases.
 Did moretesting and here is what I found.
The error message is "The process cannot access the file 'C:\Work\xMM\xMM\bin\Debug\test.log' because it is being used by another process." which happens on FileStream LogFile = new FileStream(testfile, FileMode.Append);
From this it might happend that this exception will be thrown when you try to write to the log after a call to VerifyLogFile(...)
[edit2] Rather than using
to create the file, use this. Seems to work. I'd still add the try catch block just incase.
But I don't think this code is even needed since FileStream LogFile = new FileStream(testfile, FileMode.Append); seems to create the file if it does not exist.