def test_fetch_minutes(self):
        dt = datetime.datetime(2011, 1, 12)
        path = extract_path(dt)
        url = 'http://efiles.portlandoregon.gov/webdrawer.dll/webdrawer/rec/4187324/view/'

        with open('{}neh.pdf'.format(base_resources), 'wb') as f:
            extract_fetch(f, url, dt)
예제 #2
0
 def run(self):
     if not self.url is None:
         with self.output().open("w") as f_ptr:
             extract_fetch(f_ptr, self.url, self.date)
     else:
         with self.input().open("r") as I:
             minutes_index = pickle.load(I)
             url = minutes_index[self.date]
             url = "{}{}".format(self.base_url, url)
             with self.output().open("w") as O:
                 extract_fetch(O, url, self.date)