[Pywikipedia-svn] SVN: [7278] trunk/pywikipedia/upload.py
multichill at svn.wikimedia.org
multichill at svn.wikimedia.org
Sat Sep 19 13:00:23 UTC 2009
Revision: 7278
Author: multichill
Date: 2009-09-19 13:00:22 +0000 (Sat, 19 Sep 2009)
Log Message:
-----------
Fixing pywikipediabot-Bugs-2861515:
* Have to get an edittoken now
* Set the destination filename
Modified Paths:
--------------
trunk/pywikipedia/upload.py
Modified: trunk/pywikipedia/upload.py
===================================================================
--- trunk/pywikipedia/upload.py 2009-09-18 22:45:30 UTC (rev 7277)
+++ trunk/pywikipedia/upload.py 2009-09-19 13:00:22 UTC (rev 7278)
@@ -223,6 +223,12 @@
if self.ignoreWarning:
formdata["wpIgnoreWarning"] = "1"
+ # Get an edit token so we can do the upload
+ formdata["wpEditToken"] = self.targetSite.getToken()
+
+ # Set the new filename
+ formdata["wpDestFile"] = encodedFilename
+
# try to encode the strings to the encoding used by the target site.
# if that's not possible (e.g. because there are non-Latin-1 characters and
# the home Wikipedia uses Latin-1), convert all non-ASCII characters to
More information about the Pywikipedia-svn
mailing list