def get_authority_boost(meta_data, source):
     authority_boost = None
     if meta_data and 'authority_boost' in meta_data:
         try:
             authority_boost = float(meta_data['authority_boost'])
             authority_boost = _constrain_between(authority_boost,
                                                  low=0,
                                                  high=100)
         except (ValueError, TypeError):
             pass
     else:
         authority_boost = get_authority_boost(source)
     return authority_boost
Example #2
0
 def get_authority_boost(meta_data, source):
     authority_boost = None
     if meta_data and "authority_boost" in meta_data:
         try:
             authority_boost = float(meta_data["authority_boost"])
             authority_boost = _verify_rank_feature(authority_boost,
                                                    low=0,
                                                    high=100)
         except (ValueError, TypeError):
             pass
     else:
         authority_boost = get_authority_boost(source)
     return authority_boost