RemoveRecurring sohuld be much faster
new site object have a problem with XML
phabricator.wikimedia.org/T280806 even.
Deprecated API calls
Bugs in UploadImage
Thank you
Trying to connect a wiki into Miraheze farm, DNWB returned the error: The request was aborted: Could not create SSL/TLS secure channel. I investigated the problem and it seems to me the reason is the one explained here on StackOverflow So, as suggested in that Question, I added the code ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12; at row 708, right before HttpWebRequest webReq = (HttpWebRequest)WebRequest.Create(pageURL); This modification seemingly solved the issue for me,...
Hello Luca, It's probable, but I need to see the code first.
Dear Code Driller, for my own purpose I am writing some extension to DotNetWikiBot to be used on a MediaWiki installation where WikiBase is integrated as well. I am implementing at least a part of the API as described here: https://www.mediawiki.org/wiki/Wikibase/API When I am done with this work, would you be interestend in integrating the code I added into the published version of the tool? I would give it away in open source as a thanks to you and as a possbile help to other interested users....
https://sourceforge.net/p/dotnetwikibot/svn/HEAD/tree/DebugBot.cs#l155
I am looking for examples on how to use these methods. Any help would be appriciated, Thanks
Thank you very much!
Spanish (Spain) Translation
NullReference Exception when comment is hidden
After diving into their code, the whole project seems to be convulted and interdependent, espcially on their form interface. I tried for a few hours to disect everything but couldn't get past the authorization stage. Has there been any progress made on your end, CodeDriller? I'm really hoping this project gets back up and running soon.
I found another project which I was able to get working on Wikia. You can find the code here: https://sourceforge.net/p/autowikibrowser/code/HEAD/tree/ If you're having trouble, hopefully you can peek through their code and get DotNetWikiBot up and running again. I much prefer DNWB and I hope to see it working again. I may try to edit DNWB myself now that I have an example to go off of since my project is already set up with it. Unfortunately, the project as a whole does not support Mono and I think...
I found another project which I was able to get working on Wikia. You can find the code here: https://sourceforge.net/p/autowikibrowser/code/HEAD/tree/ If you're having trouble, hopefully you can peek through their code and get DotNetWikiBot up and running again. I much prefer DNWB and I hope to see it working again. I may try to edit DNWB myself now that I have an example to go off of since my project is already set up with it.
CSRF Tokens don't work
I'm getting a similar error on version 3.15 running under .NET framework 4.5.1. Same workaround works fine. Exception: "The underlying connection was closed: An unexpected error occurred on a send." Inner exception: "Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host." Inner exception: "An existing connection was forcibly closed by the remote host"
No worries, let me know if you need anything. Please keep me posted!
It turned out to be problematic. I need more time.
Hey CodeDriller! Any updates on this?
Hey CodeDriller! Any updates on this?
Thank you!! I really appreciate your help.
Ok, I'm on it.
Recently Page.Save stopped saving pages despite saying it saved successfully. I'm guessing this has something to do with the http -> https switch. I've tried switching to https in the Site object, but pages still don't save. If found this which seems to be releated to this issue: https://sourceforge.net/p/dotnetwikibot/discussion/572545/thread/647395a8/ I tried the the latest beta version in SVN as linked but it did not work either. All the code used to work and hasn't been changed, so it must be...
Bot constructor throws exception, "new Site" fails
URI of a given page
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...
To get around this, use Page p = new Page(Site, pageName); p.LoadTextOnly(); p.Save(p.text + textToAppend);
Let's say I edit a page using my EditPage method. It is successful on all accounts. The page appears with the correct content. In this EditPage method contains: Page p = new Page(Site, pageName); p.Load(); p.Save(newPageContent); Multiple calls to this always give expected results. Now, let's say I have an AppendPage method whose contents are the following: Page p = new Page(Site, pageName); p.Load(); p.Save(p.text + textToAppend); For some reason, when this method saves, it appends to an old version...
Let's say I edit a page using my EditPage method. It is successful on all accounts. The page appears with the correct content. In this EditPage method contains: Page p = new Page(Site, pageName); p.Load(); p.Save(newPageContent); Multiple calls to this always give expected results. Now, let's say I have an AppendPage method whose contents are the following: Page p = new Page(Site, pageName); p.Load(); p.Save(p.text + textToAppend); For some reason, when this method saves, it appends to an old version...
I'm glad that everything is all right now. Good Luck!
Al these issueas were apparently caused by the same mistake as discussed in https://sourceforge.net/p/dotnetwikibot/discussion/572545/thread/d9d3fdcf/#eca9
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 know see the correct address should be www.lucamauri.net/wikitrek: with...
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 know see the correct address should be www.lucamauri.net/wikitrek: with...
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?
Sorry there was a misunderstanding: i am programming in VB.net not C#.net So unfortunately this does not work either, I still got the same problem
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
Escaping backslashes concerns all the strings in C# and in most other programming languages. It is not specific to Page.UploadImage() method. https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/string You should use your workarounds for other issues until I have time to investigate them.
Dear CodeDriller, thanks for your help, the need for escaping was not clear to me. May I suggest that you state this more clearly in the documentation page of the Page.UploadImage Method ? Regarding the other two issues, are there any suggestions from your side, or shall I go on with the workaround I used? I am asking because reconfiguring the wiki language anytime I need to upload an image is very impractical and the redirect should not be necessary in my opionion, and that should be fixed. Thanks...
The last edited page is listed first on "Special:Contributions/BotName" page. PageList.FillFromUserContributions(string userName, int limit) method can be used.
The last edited page is listed first on "Special:Contributions/BotName" page.
It seems that you didn't escape the string "D:\Temp\ht\ufp\ufp.svg". It should be "D:\\Temp\\ht\\ufp\\ufp.svg".
It seems that you didn't escape the string "D:\Temp\ht\ufp\ufp.svg". It should be "D:\Temp\ht\ufp\ufp.svg".
Hi there, I am writing here to get help about UploadImage function as I get several errors with it and I am not sure I am using it properly. The fragment of the code I use is: PaginaImmagine = New DotNetWikiBot.Page(MultiWiki, "ufp") PaginaImmagine.UploadImage("D:\Temp\ht\ufp\ufp.svg", "test1", "test2", "test3", "test4") Where MultiWiki is a properly initialized Site. Everything works fine with authentication, but when the file is being uploaded a 404 error is returned Investigating on this, I found...
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...
Hi there, I am writing here to get help about UploadImage function as I get several errors with it and I am not sure I am using it properly. The fragment of the code I use is: PaginaImmagine = New DotNetWikiBot.Page(MultiWiki, "ufp") PaginaImmagine.UploadImage("D:\Temp\ht\ufp\ufp.svg", "test1", "test2", "test3", "test4") Where MultiWiki is a properly initialized Site. Everything works fine with authentication, but when the file is being uploaded a 404 error is returned Investigating on this, I found...
Very well! Thank you.
Localized messages - IT-IT
Incorrect values concerning Page.IsRedirect() and Page.RedirectsTo()
You are mistaken. I just checked it out, IsRedirect() does not return "true" in this...
Incorrect values concerning Page.IsRedirect() and Page.RedirectsTo()
No, currently not.
Is it available on Nuget.org?
Thank you.
Yes, this is on my to-do list. Among many other things actually...
I have written for my own usage a small program to download all images from a wikipedia...
I have written for my own usage a small progam to download all images from a wikipedia...
Put \cache subdirectory with defaults.dat file where your .exe file is located.
Hi. I'm trying to import wiki bot to my project. I added to a references dotnetwikibot.dll...
Good! Thank you!
DotNetWikiBot translation
Ticket moved from /p/dotnetwikibot/bugs/112/
DotNetWikiBot translation
No problem!
I corrected all http in my programm to https, and it is working. Thank you a lot...
Bot fail to login
Commons site is not accessible through HTTP, only through HTTPS. You must write:...
|http://commons.wikimedia.org|http://commons.wikimedia.org/w/api.php|
Ok, now one more thing. Please, open the DotNetWikiBot.cs file and insert the following...
Done exactly as you said. It wrote this: C:\Users\OBO\Desktop\DotNetWikiBot_3.15>path=C:\Windows\Microsoft.NET\Framework\v3.5\...
Ok. Please, uncomment the following line in Compile & Run.bat file: csc /t:library...
I never used Visual Studio. I am trying to compile it by Compile & Run.bat which...
I still can't reproduce this. If you use Visual Studio could you please set a breakpoint...
I have reinstalled Microsoft.NET Framework. The same error occured. I even installed...
Ok, I see. Anyway it's too late to fix Substring(), the whole routine was replaced...
I just logged to uk.wikipedia.org successfully using v3.15. Please check your build...
сommons.wikimedia.org - 1.27.0-wmf.13 (d446f54) uk.wikipedia.org - 1.27.0-wmf.13...
For Version 2.101 login via API works with my suggestion. On Friday I tried 3.14...
What site are you working with? What is its MediaWiki version?
Обновил. Всё еще не работает. Пишет: csc BotScript.cs /debug:full /o- /reference:DotNetWikiBot.dll...
Token returned during login ist longer than 32 chararcters
No, version 3.15 doesn't rely on the Substring(), it gets the token using XElement:...
Here it is: v3.15
Bot fail to login
I am using 3.5 now. I did not upgrade, did not know there is a new version. Anyway,...
What is your DotNetWikiBot version? Did you upgrade to version 3.15?
All my DotNetWikiBots fail to login. That is what they write: Logging in... Unhandled...
All my DotNetWikiBots fail to login. That is what they write: Logging in... Unhandled...
All my DotNetWikiBots fail to login. That is what they write: Logging in... Unhandled...
Bot fail to login
Yes, I think all current version will fail, also 3.15 This doesn't work any more:...
Getting login security token via "?action=query&meta=tokens&type=login" was implemented...
Token returned during login ist longer than 32 chararcters
I'll think about it. But it seems fairly easy to select required links from what...
Page class needs a function to retrieve full intra-Wiki links by text.
Fixed in version 3.15.
Page.GetLinks crashes on in-page section links.