Ejemplo n.º 1
0
 def get_config(self):
     config = {
         'text': self.message
     }
     
     if self.os:
         config['os'] = [OS_DICT.get(int(i), '') for i in self.os.split(',') if i != '']
         
     if self.os:
         config['userAgents'] = [BROWSER_DICT.get(int(i), '') for i in self.browser.split(',') if i != '']
     
     config['center_latitude'] = self.center_latitude
     config['center_longitude'] = self.center_longitude
     config['radius'] = self.radius
     
     return config            
Ejemplo n.º 2
0
 def get_config(self):
     config = {
         'text': self.message
     }
     
     if self.os:
         config['os'] = [OS_DICT.get(int(i), '') for i in self.os.split(',') if i != '']
         
     if self.os:
         config['userAgents'] = [BROWSER_DICT.get(int(i), '') for i in self.browser.split(',') if i != '']
     
     config['top_latitude'] = self.top_latitude
     config['top_longitude'] = self.top_longitude
     config['side_length'] = self.side_length
     
     return config            
Ejemplo n.º 3
0
    def get_config(self):
        config = {'text': self.message}

        if self.os:
            config['os'] = [
                OS_DICT.get(int(i), '') for i in self.os.split(',') if i != ''
            ]

        if self.os:
            config['userAgents'] = [
                BROWSER_DICT.get(int(i), '') for i in self.browser.split(',')
                if i != ''
            ]

        config['center_latitude'] = self.center_latitude
        config['center_longitude'] = self.center_longitude
        config['radius'] = self.radius

        return config