#87 indexPath is not correctly set on Wikia

closed-fixed
nobody
None
2012-04-24
2012-04-21
Anonymous
No

Hi,
I wanted to run a script on a Wikia wiki I never connected before with latest version of DotNetWikiBot (2.99) and got the error "failed to log in". After a litlle digging I figured out the indexpath was not set so bot was considering the following URL: http://mywiki.wikia.comapi.php?action=login (missing / between .com and api.php).
To make it work I tweaked a bit GetPaths method by
* adding "Regex indexPathRE3 = new Regex("(?i)wgScript=\"(/[^\"\\s<>?]*?)index\\.php");"
* changing "indexPath = indexPathRE2.Match(src).Groups[1].ToString();" by
" if (!site.Contains("wikia.com"))
indexPath = indexPathRE2.Match(src).Groups[1].ToString();
else
indexPath = indexPathRE3.Match(src).Groups[1].ToString();"
Indeed, bot get main page source to determine index.php path, though Wikia is adding a wgScript JS variable in the produced code which indicate where to find it, so why not use it? By the way the full URL with index.php cannot sometimes be found in the main source page.
Regards.

Discussion

  • Comment has been marked as spam. 
    Undo

    You can see all pending comments posted by this user  here

    Anonymous - 2012-04-21

    Sounds like I didn't use the same account as usual to report, I'm wyzfr

     
  • CodeDriller

    CodeDriller - 2012-04-24

    Ok, fixed in version 2.100.

     
  • CodeDriller

    CodeDriller - 2012-04-24
    • status: open --> closed-fixed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks