mirror of
https://github.com/WikiTeam/wikiteam
synced 2024-11-04 12:00:28 +00:00
Issue 68: Use GET, not POST, to download images; some harm and no? good
git-svn-id: https://wikiteam.googlecode.com/svn/trunk@851 31edc4fc-5e31-b4c4-d58b-c8bc928bcb95
This commit is contained in:
parent
0eb4913f89
commit
7c94815e2c
@ -668,7 +668,8 @@ def generateImageDump(config={}, other={}, images=[], start=''):
|
|||||||
class URLopenerUserAgent(urllib.FancyURLopener):
|
class URLopenerUserAgent(urllib.FancyURLopener):
|
||||||
version = "%s" % getUserAgent()
|
version = "%s" % getUserAgent()
|
||||||
urllib._urlopener = URLopenerUserAgent()
|
urllib._urlopener = URLopenerUserAgent()
|
||||||
urllib.urlretrieve(url=url, filename='%s/%s' % (imagepath, filename2), data=urllib.urlencode({})) #fix, image request fails on wikipedia (POST neither works?)
|
urllib.urlretrieve(url=url, filename='%s/%s' % (imagepath, filename2) )
|
||||||
|
# TODO: data=urllib.urlencode({}) removed image; request fails on wikipedia and POST neither works?
|
||||||
|
|
||||||
#saving description if any
|
#saving description if any
|
||||||
xmlfiledesc = getXMLFileDesc(config=config, title='Image:%s' % (filename)) # use Image: for backwards compatibility
|
xmlfiledesc = getXMLFileDesc(config=config, title='Image:%s' % (filename)) # use Image: for backwards compatibility
|
||||||
|
Loading…
Reference in New Issue
Block a user