# Path: uamobile/scrapers/base.py
# class Scraper(object):
#     # subclass must override this property
#     url = None
# 
#     def scrape(self):
#         stream = self.get_stream()
#         doc = self.get_document(stream)
#         return self.do_scrape(doc)
# 
#     def get_document(self, stream):
#         doc = etree.parse(stream, etree.HTMLParser(remove_comments=True))
#         return doc
# 
#     def get_stream(self):
#         return urllib2.urlopen(self.url)
# 
#     def do_scrape(self, doc):
#         raise NotImplementedError()


import re
from uamobile.scrapers.base import Scraper
        from uamobile.data.model.ezweb import DATA
                    continue

                flash = ''.join(tr[11].itertext()).strip()
                if flash == u'\u25cf':
                    version = '2.0'
                elif flash == u'\u25ce':
                    version = '1.1'
                elif flash == u'\u25cb':
                    version = '1.1'
                else:
                    version = None

                devices = ''.join(tr[0].itertext()).strip().split('/')
                for idx, device in enumerate(devices):
                    if not device:
                        continue

                    if idx == 0:
                        model = self.get_model(device)
                    else:
                        pos = devices[0].find(device[0])
                        model = self.get_model(devices[0][:pos] + device)

                    if not model:
                        continue

                    res[model] = version

        return res


# Path: uamobile/scrapers/base.py
# class Scraper(object):
#     # subclass must override this property
#     url = None
# 
#     def scrape(self):
#         stream = self.get_stream()
#         doc = self.get_document(stream)
#         return self.do_scrape(doc)
# 
#     def get_document(self, stream):
#         doc = etree.parse(stream, etree.HTMLParser(remove_comments=True))
#         return doc
# 
#     def get_stream(self):
#         return urllib2.urlopen(self.url)
# 
#     def do_scrape(self, doc):
#         raise NotImplementedError()


# Path: uamobile/scrapers/flash.py
import re
from uamobile.scrapers.base import Scraper
        from uamobile.data.model.ezweb import DATA

                    continue

                flash = ''.join(tr[11].itertext()).strip()
                if flash == u'\u25cf':
                    version = '2.0'
                elif flash == u'\u25ce':
                    version = '1.1'
                elif flash == u'\u25cb':
                    version = '1.1'
                else:
                    version = None

                devices = ''.join(tr[0].itertext()).strip().split('/')
                for idx, device in enumerate(devices):
                    if not device:
                        continue

                    if idx == 0:
                        model = self.get_model(device)
                    else:
                        pos = devices[0].find(device[0])
                        model = self.get_model(devices[0][:pos] + device)

                    if not model:
                        continue

                    res[model] = version

        return res


class SoftBankScraper(Scraper):