aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFilipp Lepalaan <f@0x00.co>2013-04-03 11:36:59 +0300
committerFilipp Lepalaan <f@0x00.co>2013-04-03 11:36:59 +0300
commitac3046f2f7b527b3e44d1364201855df3d74ab3c (patch)
tree90d70fb4552e5433657bea90ede331b524f2545c
parent9affd074486b45ee7c0c01e452d623f7b33d63d4 (diff)
downloadpy-gsxws-ac3046f2f7b527b3e44d1364201855df3d74ab3c.tar.gz
py-gsxws-ac3046f2f7b527b3e44d1364201855df3d74ab3c.tar.bz2
py-gsxws-ac3046f2f7b527b3e44d1364201855df3d74ab3c.zip
Fixing fetching Part image
-rwxr-xr-xgsxws.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/gsxws.py b/gsxws.py
index b36c676..99db20f 100755
--- a/gsxws.py
+++ b/gsxws.py
@@ -574,10 +574,8 @@ class Part(GsxObject):
if self.partNumber is None:
raise GsxError('Cannot fetch part image without part number')
- url = 'https://km.support.apple.com.edgekey.net/kb/imageService.jsp?image=%s_350_350.gif' % self.partNumber
- p = urlparse.urlparse(url)
- filename = p.query.split('=')[1]
-
+ image = '%s_350_350.gif' % self.partNumber
+ url = 'https://km.support.apple.com.edgekey.net/kb/imageService.jsp?image=%s' % image
tmpfile = tempfile.NamedTemporaryFile(suffix=filename)
try: