Home | Trees | Index | Help |
|
---|
Package pywikipedia :: Module login |
|
Script to log the robot in to a wikipedia account. Suggestion is to make a special account to use for robot use only. Make sure this robot account is well known on your home wikipedia before using. This script has no command line arguments. Please run it as such. It will ask for your username and password (it will show your password on the screen!), log in to your home wikipedia using this combination, and store the resulting cookies (containing your password in encoded form, so keep it secured!) in a file named login.data The wikipedia library will be looking for this file and will use the login information if it is present. Arguments: -lang:xx Log in to the given wikipedia language To log out, throw away the XX-login.data file that is created in the login-data subdirectory..
Function Summary | |
---|---|
Checks whether the bot is listed on Wikipedia:bots | |
Login to wikipedia. | |
main(args)
| |
creates missing directories for the given path and returns a normalized absolute version of the path. | |
Stores cookie data |
pywikipedia.config
,
getpass
,
httplib
,
re
,
sys
,
pywikipedia.wikipedia
__version__
Function Details |
---|
allowedbot(username, site)Checks whether the bot is listed on Wikipedia:bots |
login(site, username, password, remember=True)Login to wikipedia. site Site object for Wikipedia language+family username Username to login with password Password for username remember Remember login (default: True) Returns cookie data if succesful, False otherwise. |
makepath(path)creates missing directories for the given path and returns a normalized absolute version of the path. - if the given path already exists in the filesystem the filesystem is not modified. - otherwise makepath creates directories along the given path using the dirname() of the path. You may append a '/' to the path if you want it to be a directory path. from holger@trillke.net 2002/03/18 |
storecookiedata(data, site, user=None)Stores cookie data The first argument is the raw data, as returned by login(). The second argument is the Site object. The third argument is optional and is the user. It allows muliple-user bots. If it is not given, the filename is old-style. Otherwise, the username is also included in the filename for the login data. Returns nothing. |
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.1 on Sun Jul 03 17:07:33 2005 | http://epydoc.sf.net |