server error 400 on page.load()

Help
Jacopo
2012-03-16
2013-05-13
  • Jacopo

    Jacopo - 2012-03-16

    Hi,

    I have used your nice dll in a simple query program that lookup italian city pages on the italian wiki and donwload information about that (I need the data for a geography project).

    The following code worked just fine with the first cities in my list, but then I noticed I get an error on Page.Load  (server error 400) in some pages:

    Site site = new Site("http://it.wikipedia.org", username, pwd);
    Page p = new Page(site, cityName);
    p.Load();

    (try for example as cityName "Aci_Sant%27Antonio")

    May it be because of the number of queries from a single IP (but I doubt that, italian cities are just 8000 and I seem to get the error with "specific" cities)?

    Any hints would be very appreciated,

    Thx

    JT

     
  • CodeDriller

    CodeDriller - 2012-03-17

    Pages titles are url-encoded inside Load() function, they must not be encoded befor that. This is likely a cause of a problem.

    Here it must be:
    Page p = new Page(site, "Aci Sant'Antonio");    // not "Aci_Sant%27Antonio"

     

Log in to post a comment.

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

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks