Esempio n. 1
0
    def get(self):
        items = viewData()
        objs = []

        for i in items:
            linkUrl = i["link"][0]["attributes"]["href"]
            app_id = re.findall(r"id(\d+)", linkUrl, re.S)[0]

            app = AppObject()
            app.setAppId(app_id)
            app.setTitle(i["title"]["label"])
            app.setIcon(i["im:image"][2]["label"])
            objs.append(app)

        self.render("templates/main.html", apps=objs)
Esempio n. 2
0
    def get(self, app_id):
        appContent = getApp(app_id)

        app = AppObject()
        app.setAppId(app_id)
        app.setTitle(appContent["trackName"])
        app.setIcon(appContent["artworkUrl60"])
        app.setPrice(appContent["price"])
        app.setDescription(appContent["description"])
        screenshots = []
        for i in appContent["screenshotUrls"]:
            screenshots.append(i)
        print screenshots
        app.setScreenshots(screenshots)
        self.render("templates/app.html", app=app)