from google.appengine.ext import webapp
from google.appengine.ext.webapp import util
from google.appengine.ext import db
from google.appengine.api import urlfetch
class TrakHtml(db.Model):
hawb = db.StringProperty(required=False)
htmlData = db.TextProperty()
class MainHandler(webapp.RequestHandler):
def get(self):
Traks = list()
Traks.append('93332134')
#Traks.append('91779831')
#Traks.append('92782244')
#Traks.append('38476214')
for st in Traks :
trak = TrakHtml()
trak.hawb = st
url = 'http://etracking.cevalogistics.com/eTrackResultsMulti.aspx?sv='+st
result = urlfetch.fetch(url)
self.response.out.write(result.read())
trak.htmlData = result.read()
trak.put()
result.read()
is not giving whole file , it giving some portion. trak.htmlData
is a TextProperty()
so it has to store whole file and i want that only.