Tony Sidaway wrote: > The following is a shell session using the lynx browser to illustrate > the problem. Sensitive data has been blanked out. The second browser > invocation is identical to the first except for "&format=xml", but > instead of returning xml it returns only blank lines. > > t...@home:~$ lynx -post-data http://en-wikipedia.org/w/api.php > action=login&lgname=USERNAME&lgpassword=PASSWORD > --- > You are looking at the HTML representation of the XML format. > HTML is good for debugging, but probably is not suitable for your > application. > See [1]complete documentation, or [2]API help for more information. > <?xml version="1.0"?> > <api> > <login result="Success" lguserid="XXX" lgusername="USERNAME" > lgtoken="TOKEN" cookieprefix="enwiki" sessionid="SESSIONID" /> > </api> > > References > > 1. http://www.mediawiki.org/wiki/API > 2. http://en.wikipedia.org/w/api.php > > t...@home:~$ lynx -post-data http://en-wikipedia.org/w/api.php > action=login&lgname=USERNAME&lgpassword=PASSWORD&format=xml > --- > > > t...@home:~$
& is a special character for the shell. Are you quoting it? (the easiest way, placing single quotes around the text) If you posted on the second invocation to en-wikipedia.org instead of en.wikipedia.org that could matter, too. _______________________________________________ Mediawiki-api mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
