Exemplo n.º 1
0
    def fetch_data(self):

        url = City.url_prefix + self._state + '/' + self._city
        dest = City.file_prefix + self._abbrv + '/City/' + self._city
        print 'downloading state (%s), city (%s), url (%s), dest (%s)' % (self._state, self._city, url, dest)

        dst_file = File(dest)
        if dst_file.exists() is True:
            print '........Data for %s, %s already present' % (self._state, self._city)
            return

        download = Download(url, dest)
        download.download_cookie()
Exemplo n.º 2
0
    def fetch_data(self):

        url = City.url_prefix + self._state + '/' + self._city
        dest = City.file_prefix + self._abbrv + '/City/' + self._city
        print 'downloading state (%s), city (%s), url (%s), dest (%s)' % (
            self._state, self._city, url, dest)

        dst_file = File(dest)
        if dst_file.exists() is True:
            print '........Data for %s, %s already present' % (self._state,
                                                               self._city)
            return

        download = Download(url, dest)
        download.download_cookie()