def get(self):
        url = self.request.get('url')

        self.response.headers['Content-Type'] = 'text/html; charset=UTF-8'
        def add_field(label, value):
            self.response.out.write('<p><b>%s</b>: %s</p>' % (label, value))

        iframe_url, iframe_width, iframe_height = get_iframe_info(url)
        if iframe_url:
            add_field('iframe_url', iframe_url)
            add_field('iframe_width', iframe_width)
            add_field('iframe_height', iframe_height)
            iframe_attributes = ''
            if iframe_width and iframe_height:
                iframe_attributes = ' width="%d" height="%d"' % (
                    iframe_width, iframe_height)
            add_field('HTML',
                '<iframe src="%s" frameborder="0"%s></iframe>'
                % (xml.sax.saxutils.escape(iframe_url), iframe_attributes))

        def add_thumbnail(size):
          thumb_url, thumb_width, thumb_height = get_thumbnail_info(url, size)
          if thumb_url:
              add_field('thumb_url (%s)' % size, thumb_url)
              add_field(size % 'thumb_width (%s)', thumb_width)
              add_field('thumb_height (%s)' % size, thumb_height)
              img_attributes = ''
              if thumb_width and thumb_height:
                  img_attributes = ' width="%d" height="%d"' % (
                      thumb_width, thumb_height)
              add_field('HTML (%s)',
                  '<img src="%s" alt="" style="padding:2px"%s/>'
                  % (xml.sax.saxutils.escape(thumb_url), img_attributes))

        add_thumbnail(LARGE_THUMBNAIL)
        add_thumbnail(SMALL_THUMBNAIL)
dataset/ETHPy150Open mihaip/streamspigot/app/datasources/thumbnails.py/TestHandler.get/swapped operands of `%`