diff --git a/src/pojo/ip/ip_location.py b/src/pojo/ip/ip_location.py new file mode 100644 index 0000000..99ec311 --- /dev/null +++ b/src/pojo/ip/ip_location.py @@ -0,0 +1,10 @@ +class IPLocationInfo: + + def __init__(self, ip, country, city, isp): + self.ip = ip + self.country = country + self.city = city + self.isp = isp + + def __repr__(self): + return "ip:{}, country:{}, city:{}, isp:{}".format(self.ip, self.country, self.city, self.isp) diff --git a/src/utils/contacts/generate_ip_with_contact.py b/src/utils/contacts/generate_ip_with_contact.py index 80f72bf..6eb1a5a 100644 --- a/src/utils/contacts/generate_ip_with_contact.py +++ b/src/utils/contacts/generate_ip_with_contact.py @@ -11,7 +11,7 @@ from src.pojo.ip.ip_location import IPLocationInfo def get_contact_list() -> list: - _successful_items = MONGO_STORE_MANAGER.get_all_successful_items_for_yesterday() + _successful_items = MONGO_STORE_MANAGER.get_all_successful_items_for_day() _contact_list = [] for item in _successful_items: if item.url_validated: