@@ -264,7 +264,7 @@ def do_login(self, code):
264264
265265 return True
266266
267- def find_centers (self , where , motives = None ):
267+ def find_centers (self , where , motives = None , additional_centers = None ):
268268 if motives is None :
269269 motives = self .vaccine_motives .keys ()
270270 for city in where :
@@ -300,6 +300,17 @@ def find_centers(self, where, motives=None):
300300 except KeyError :
301301 pass
302302
303+ if additional_centers :
304+ for additional_center in additional_centers :
305+ splitted = additional_center .split (';' )
306+ if len (splitted ) == 3 :
307+ yield {
308+ "name_with_title" : splitted [0 ], #"Corona Impfzentren - Berlin",
309+ "city" : splitted [1 ], #"Berlin",
310+ "url" : splitted [2 ], #"/institut/berlin/ciz-berlin-berlin"
311+ }
312+
313+
303314 def get_patients (self ):
304315 self .master_patient .go ()
305316
@@ -618,6 +629,8 @@ def main(self, cli_args=None):
618629 action = 'append' , help = 'exclude centers' )
619630 parser .add_argument ('--center-exclude-regex' ,
620631 action = 'append' , help = 'exclude centers by regex' )
632+ parser .add_argument ('--additional-center' , '-ac' ,
633+ action = 'append' , help = 'Add additional centers or doctors: "name;city;link" e.g. "Corona Impfzentren - Berlin;Berlin;/institut/berlin/ciz-berlin-berlin"' )
621634 parser .add_argument (
622635 '--include-neighbor-city' , '-n' , action = 'store_true' , help = 'include neighboring cities' )
623636 parser .add_argument ('--start-date' , type = str , default = None ,
@@ -756,7 +769,7 @@ def main(self, cli_args=None):
756769 while True :
757770 log_ts ()
758771 try :
759- for center in docto .find_centers (cities , motives ):
772+ for center in docto .find_centers (cities , motives , args . additional_center ):
760773 if args .center :
761774 if center ['name_with_title' ] not in args .center :
762775 logging .debug ("Skipping center '%s'" %
0 commit comments