On 23. of October last year a the follwing was posted to this group:
There were two advices (use urllib2 and "wb"). I tried to build this
script on this basis:
import win32api
import win32com
import urllib2
gif&p=TAMA&fy=1 900&ty=2005&m=2 1&r_type=TR&r_n o=1")
htmlSource=urll ib2.urlopen("ht tp://www.godandscien ce.org/images/nebula..jpg")
# Read from the object, storing the page's contents in 's'.
s = htmlSource.read ()
htmlSource.clos e()
myfile = open("P:\Jobb\P rosjekt\Maaneds oversikt\myfile .jpg", "wb")
myfile.write(s)
myfile.close
But the images get cropped at the bottom. Any suggestions on how to get
the whole image, and not only 80 - 90% (I run python 2.4 with PythonWin on
a Windows XP)
--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
htmlSource=urll ib.urlopen("htt p://www.godandscien ce.org/images/nebula.jpg")
# Read from the object, storing the page's contents in 's'.
s = htmlSource.read ()
htmlSource.clos e()
myfile = open("myfile.jp g", "w")
myfile.write(s)
myfile.close
# Read from the object, storing the page's contents in 's'.
s = htmlSource.read ()
htmlSource.clos e()
myfile = open("myfile.jp g", "w")
myfile.write(s)
myfile.close
script on this basis:
import win32api
import win32com
import urllib2
gif&p=TAMA&fy=1 900&ty=2005&m=2 1&r_type=TR&r_n o=1")
htmlSource=urll ib2.urlopen("ht tp://www.godandscien ce.org/images/nebula..jpg")
# Read from the object, storing the page's contents in 's'.
s = htmlSource.read ()
htmlSource.clos e()
myfile = open("P:\Jobb\P rosjekt\Maaneds oversikt\myfile .jpg", "wb")
myfile.write(s)
myfile.close
But the images get cropped at the bottom. Any suggestions on how to get
the whole image, and not only 80 - 90% (I run python 2.4 with PythonWin on
a Windows XP)
--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
Comment