When i try with "Ex" i get error, that i think in not direktly conncted to this:
(MediaWiki 1.15.4)
Getting 10 page titles from "Special:ListRedirects" page…
Unhandled Exception: System.Xml.XmlException: comments cannot contain '-' Line 129, position 5.
at Mono.Xml2.XmlTextReader.ReadComment ()
at Mono.Xml2.XmlTextReader.ReadDeclaration ()
at Mono.Xml2.XmlTextReader.ReadContent ()
at Mono.Xml2.XmlTextReader.ReadContent ()
at Mono.Xml2.XmlTextReader.Read ()
at System.Xml.XmlTextReader.Read ()
at System.Xml.XmlDocument.ReadNodeCore (System.Xml.XmlReader reader)
at System.Xml.XmlDocument.ReadNodeCore (System.Xml.XmlReader reader)
at System.Xml.XmlDocument.ReadNodeCore (System.Xml.XmlReader reader)
at System.Xml.XmlDocument.ReadNodeCore (System.Xml.XmlReader reader)
at System.Xml.XmlDocument.ReadNodeCore (System.Xml.XmlReader reader)
at System.Xml.XmlDocument.ReadNodeCore (System.Xml.XmlReader reader)
at System.Xml.XmlDocument.ReadNodeCore (System.Xml.XmlReader reader)
at System.Xml.XmlDocument.ReadNodeCore (System.Xml.XmlReader reader)
at System.Xml.XmlDocument.ReadNodeCore (System.Xml.XmlReader reader)
at System.Xml.XmlDocument.ReadNode (System.Xml.XmlReader reader)
at System.Xml.XmlDocument.Load (System.Xml.XmlReader xmlReader)
at System.Xml.XmlDocument.LoadXml (System.String xml)
at DotNetWikiBot.PageList.FillFromCustomSpecialPageEx (System.String pageTitle, Int32 quantity)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Logged in as CleanUpBot.
Site: e-studij.si (MediaWiki 1.15.4)
Getting 10 page titles from "Special:ListRedirects" page…
Unhandled Exception: System.Xml.XmlException: Document type cannot appear in this state. Line 5, position 10.
at Mono.Xml2.XmlTextReader.ReadDoctypeDecl ()
at Mono.Xml2.XmlTextReader.ReadDeclaration ()
at Mono.Xml2.XmlTextReader.ReadContent ()
at Mono.Xml2.XmlTextReader.Read ()
at System.Xml.XmlTextReader.Read ()
at Mono.Xml.XmlFilterReader.Read ()
at Mono.Xml.XmlFilterReader.Read ()
at Mono.Xml.XPath.DTMXPathDocumentBuilder2.Compile ()
at Mono.Xml.XPath.DTMXPathDocumentBuilder2.Init (System.Xml.XmlReader reader, XmlSpace space, Int32 defaultCapacity)
at Mono.Xml.XPath.DTMXPathDocumentBuilder2..ctor (System.Xml.XmlReader reader, XmlSpace space, Int32 defaultCapacity)
at Mono.Xml.XPath.DTMXPathDocumentBuilder2..ctor (System.Xml.XmlReader reader, XmlSpace space)
at System.Xml.XPath.XPathDocument.Initialize (System.Xml.XmlReader reader, XmlSpace space)
at System.Xml.XPath.XPathDocument..ctor (System.Xml.XmlReader reader, XmlSpace space)
at System.Xml.XPath.XPathDocument..ctor (System.Xml.XmlReader reader)
at DotNetWikiBot.Site.GetXMLIterator (System.String xmlSource, System.String xpathQuery) in /home/…/DotNetWikiBot.cs:1058
at DotNetWikiBot.PageList.FillFromCustomSpecialPageEx (System.String pageTitle, Int32 quantity) in /home/…/DotNetWikiBot.cs:3205
at MyFirstBot.Workout.IzbrisiOdvecnePreusmeritve (DotNetWikiBot.Site myWiki) in /home/…/Workout.cs:51
at MyFirstBot.MainClass.Main (System.String args) in /home/…/Main.cs:25
The application was terminated by a signal: SIGHUP
Line 51 of WorkOuk.cs
pl.FillFromCustomSpecialPageEx ("ListRedirects", 10);
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Beware that there are some unconventional newline characters in the beginning of HTML pages on e-studij.si. This may pose a problem for some parsers, even for RSS. The usual cause of it are erroneous newline characters in the end of .php files after ?> tag. You should remove it, if you have edited some MediaWiki .php files there.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm trying to get all ListRedirects and i'm having little problem.
I create request: pl.FillFromCustomSpecialPage ("ListRedirects", 10);
and on pl (PageList) I get target pages, but i want to get Redirect pages. Any suggestion how can i do it?
Thx
That's a bug and it needs correction.
For now you can call:
pl.FillFromCustomSpecialPageEx("ListRedirects", 10);
(note "Ex" at the end of function name). That function will return PageList, where every odd page is redirect and every even page is target.
Thx for that info.
When i try with "Ex" i get error, that i think in not direktly conncted to this:
(MediaWiki 1.15.4)
Getting 10 page titles from "Special:ListRedirects" page…
Unhandled Exception: System.Xml.XmlException: comments cannot contain '-' Line 129, position 5.
at Mono.Xml2.XmlTextReader.ReadComment ()
at Mono.Xml2.XmlTextReader.ReadDeclaration ()
at Mono.Xml2.XmlTextReader.ReadContent ()
at Mono.Xml2.XmlTextReader.ReadContent ()
at Mono.Xml2.XmlTextReader.Read ()
at System.Xml.XmlTextReader.Read ()
at System.Xml.XmlDocument.ReadNodeCore (System.Xml.XmlReader reader)
at System.Xml.XmlDocument.ReadNodeCore (System.Xml.XmlReader reader)
at System.Xml.XmlDocument.ReadNodeCore (System.Xml.XmlReader reader)
at System.Xml.XmlDocument.ReadNodeCore (System.Xml.XmlReader reader)
at System.Xml.XmlDocument.ReadNodeCore (System.Xml.XmlReader reader)
at System.Xml.XmlDocument.ReadNodeCore (System.Xml.XmlReader reader)
at System.Xml.XmlDocument.ReadNodeCore (System.Xml.XmlReader reader)
at System.Xml.XmlDocument.ReadNodeCore (System.Xml.XmlReader reader)
at System.Xml.XmlDocument.ReadNodeCore (System.Xml.XmlReader reader)
at System.Xml.XmlDocument.ReadNode (System.Xml.XmlReader reader)
at System.Xml.XmlDocument.Load (System.Xml.XmlReader xmlReader)
at System.Xml.XmlDocument.LoadXml (System.String xml)
at DotNetWikiBot.PageList.FillFromCustomSpecialPageEx (System.String pageTitle, Int32 quantity)
And YES a found '-' in comments of pages
I've just uploaded new beta version to CVS: http://dotnetwikibot.cvs.sourceforge.net/viewvc/dotnetwikibot/framework/DotNetWikiBot.cs, it may help with that '-' exception. Please, tell me if it doesn't.
Juping from one problem to other :P
Logged in as CleanUpBot.
Site: e-studij.si (MediaWiki 1.15.4)
Getting 10 page titles from "Special:ListRedirects" page…
Unhandled Exception: System.Xml.XmlException: Document type cannot appear in this state. Line 5, position 10.
at Mono.Xml2.XmlTextReader.ReadDoctypeDecl ()
at Mono.Xml2.XmlTextReader.ReadDeclaration ()
at Mono.Xml2.XmlTextReader.ReadContent ()
at Mono.Xml2.XmlTextReader.Read ()
at System.Xml.XmlTextReader.Read ()
at Mono.Xml.XmlFilterReader.Read ()
at Mono.Xml.XmlFilterReader.Read ()
at Mono.Xml.XPath.DTMXPathDocumentBuilder2.Compile ()
at Mono.Xml.XPath.DTMXPathDocumentBuilder2.Init (System.Xml.XmlReader reader, XmlSpace space, Int32 defaultCapacity)
at Mono.Xml.XPath.DTMXPathDocumentBuilder2..ctor (System.Xml.XmlReader reader, XmlSpace space, Int32 defaultCapacity)
at Mono.Xml.XPath.DTMXPathDocumentBuilder2..ctor (System.Xml.XmlReader reader, XmlSpace space)
at System.Xml.XPath.XPathDocument.Initialize (System.Xml.XmlReader reader, XmlSpace space)
at System.Xml.XPath.XPathDocument..ctor (System.Xml.XmlReader reader, XmlSpace space)
at System.Xml.XPath.XPathDocument..ctor (System.Xml.XmlReader reader)
at DotNetWikiBot.Site.GetXMLIterator (System.String xmlSource, System.String xpathQuery) in /home/…/DotNetWikiBot.cs:1058
at DotNetWikiBot.PageList.FillFromCustomSpecialPageEx (System.String pageTitle, Int32 quantity) in /home/…/DotNetWikiBot.cs:3205
at MyFirstBot.Workout.IzbrisiOdvecnePreusmeritve (DotNetWikiBot.Site myWiki) in /home/…/Workout.cs:51
at MyFirstBot.MainClass.Main (System.String args) in /home/…/Main.cs:25
The application was terminated by a signal: SIGHUP
Line 51 of WorkOuk.cs
pl.FillFromCustomSpecialPageEx ("ListRedirects", 10);
Yep. Uploaded once again tohttp://dotnetwikibot.cvs.sourceforge.net/viewvc/dotnetwikibot/framework/DotNetWikiBot.cs.
Beware that there are some unconventional newline characters in the beginning of HTML pages on e-studij.si. This may pose a problem for some parsers, even for RSS. The usual cause of it are erroneous newline characters in the end of .php files after ?> tag. You should remove it, if you have edited some MediaWiki .php files there.
Thx. Now it does work.
BTW is method "IsRedirect" working in general?
Thx for notice about new lines. I'll try to find which file making that.
Yes, I checked IsRedirect() function just a couple of days ago. Just don't forget to Load() the page before calling IsRedirect().