Note that there are some explanatory texts on larger screens.

plurals
  1. POGet data from webpages with Python
    primarykey
    data
    text
    <p>Looking to get data from a specific website with Python to upload onto Google App Engine. The idea is to create a database data to store the information on the server to retrieve and display in an web app.</p> <pre><code> from google.appengine.ext import webapp from google.appengine.ext.webapp.util import run_wsgi_app from google.appengine.ext import db import os import datetime from google.appengine.ext.webapp import template # A class which creates all the pokemon on the server class Pokemondata(db.Model): number = db.IntegerProperty() pokemonname = db.StringProperty() description = db.StringProperty() newpoke = Pokemondata(number="001",pokemonname="Balbasuar",description="The grass pokemon") newpoke = Pokemondata(number="002",pokemonname="Ivysaur",description="The seed pokemon") newpoke = Pokemondata(number="003",pokemonname="Venasaur",description="Another grass pokemon") newpoke.put() # A class to put new pokemon in to the server ? class ApplyHandler(webapp.RequestHandler): def post(self): self.session = Session() pnumber = self.request.get('number') pname = self.request.get('pokemonname') pdescription = self.request.get('description') newpoke = Pokemondata(number=pnumber,pokemonname=pname,description=pdescription) newpoke.put() self.session['pokemon'] = pname doRender(self,"board.htm",{}) # Construct a google table for this data # to display class JSONInterface(webapp.RequestHandler): def get(self): que = db.Query(Pokemondata) listing = que.fetch(limit = 12) doRender(self,'http://pokedexapp.appspot.com/?user=cater54321@gmail.com#input', {'listing':listing}) application = webapp.WSGIApplication([('/(.*html)?', ApplyHandler), ('/json', JSONInterface)], debug=True) def main(): run_wsgi_app(application) if __name__ == "__main__": main() </code></pre> <p>When I do deploy the app to test I am getting server error. Can anyone tell me if this is a step in the right direction and what needs amending?</p> <p>The yaml file currently is </p> <p>application: pokedexapp version: 1 runtime: python api_version: 1</p> <p>handlers: - url: /.* script: main.py</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload