Hi there,
in order to keep a low stress on the Wiki site, i am using the PageList.SaveSmoothly function to save a bunch (usually a few hundreds) of pages.
Sometimes, during the process i get the Invalid token exception: I saw this topic was discussed some times here, but no definitive solutions seems to have been found.
So the only thing I can do when I encouter the issue is to restart the process hoping it will run properly at the end.
What I was thinking about was to take note of the last page saved by PageList.SaveSmoothly before the exception, close the connection, start a new one and then start saving from the previous page.
The problem is that I do not see any obvious way to determine the last page saved: is there a way to do so that escapes me?
Tthanks a lot for any help you might provide
Luca
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Dear CodeDriller,
unfortunately this does not work.
First of all, the function only works when the Wiki is in EN language, so I need to change the language each time I need to perform this search.
Secondly, even changing the language and starting the query again, I always get just one page, a page titled Log out and this is consistently the same regrdless the user I try
Any idea why this is happening?
Thanks
Luca
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
No, currently I have no idea. Your site doesn't seem to support English titles of special pages for some reason. This is unusual, and I have no explanation for now.
What is the site address that you pass to Site() constructor?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi there,
in order to keep a low stress on the Wiki site, i am using the
PageList.SaveSmoothly
function to save a bunch (usually a few hundreds) of pages.Sometimes, during the process i get the
Invalid token
exception: I saw this topic was discussed some times here, but no definitive solutions seems to have been found.So the only thing I can do when I encouter the issue is to restart the process hoping it will run properly at the end.
What I was thinking about was to take note of the last page saved by
PageList.SaveSmoothly
before the exception, close the connection, start a new one and then start saving from the previous page.The problem is that I do not see any obvious way to determine the last page saved: is there a way to do so that escapes me?
Tthanks a lot for any help you might provide
Luca
The last edited page is listed first on "Special:Contributions/BotName" page.
PageList.FillFromUserContributions(string userName, int limit) method can be used.
Last edit: CodeDriller 2017-09-28
Dear CodeDriller,
unfortunately this does not work.
First of all, the function only works when the Wiki is in EN language, so I need to change the language each time I need to perform this search.
Secondly, even changing the language and starting the query again, I always get just one page, a page titled
Log out
and this is consistently the same regrdless the user I tryAny idea why this is happening?
Thanks
Luca
No, currently I have no idea. Your site doesn't seem to support English titles of special pages for some reason. This is unusual, and I have no explanation for now.
What is the site address that you pass to Site() constructor?
Dear CodeDriller,
thanks, you solved the issue.
The problem causing my issues was actaully the site address as you suggested.
For some reason, when I started using your tool, I wrote the string
_WikiTrek = New DotNetWikiBot.Site("http://www.lucamauri.net/wikitrek/index.php")
passing the address
www.lucamauri.net/wikitrek/index.php
: it worked fine on first tests and on pages creation so I never gave a second thought.In fact, I now see the correct address should be
www.lucamauri.net/wikitrek
: with this modification, I was finally able to solve this issue.That was very silly on my part, sorry for wasting your time and thanks again for the help.
Luca
Last edit: Luca Mauri 2018-03-04