IPGeo Search
v1.0.1: Updated redundancy
Ipgeo-Search عبارة عن وحدة بيثون تتيح الاستخدام السهل لاتصالات iPgeo API. يسمح للمستخدمين المجانيين والمدفوعين بإرسال طلبات إلى الخادم في سطر واحد فقط من التعليمات البرمجية ، مما يسمح بتخصيص كيفية تحميل قوائم IP. نحن نقدم تجربة مجانية لمدة 5 أيام لواجهة برمجة التطبيقات الخاصة بنا على صفحة الويب الخاصة بنا. للحصول على مفتاح API التجريبي المجاني ، اتصل بمختبرنا وسنرسله إليك.
لتثبيت ipgeosearch ، قم بتشغيل
pip install IPGeoSearch قبل التشغيل على جهاز الكمبيوتر المحلي الخاص بك ، تأكد من أن لديك python 3.6+ مع أحدث إصدار من pandas المثبت.
لتثبيت الباندا ، تشغيل:
pip install pandas تأخذ وظيفة search في 3 وسيطات:
ipList: an Array of IP's where each IP is a string.
path: Where the result files are downloaded to.
key: The API Key sent to you.
لاستخدام أي من الإصدارين ، يجب عليك توفير مفتاحك للخادم.
from IPGeoSearch import search
with open ( 'ipList.txt' , 'r' ) as f :
ip = [ line . strip () for line in f ]
f . close ()
with open ( 'yourkey.key' , 'r' ) as hashkey :
key = hashkey . read (). replace ( ' n ' , '' )
hashkey . close ()
search . search ( ipList = ip , path = '' , key = key )الأخطاء الشائعة هي:
TypeError : "An entry in ipList is not a string at line and cannot be read by the server"
RuntimeError : "Your Key is Invalid. Please purchase a key or start a trial."
RuntimeError : "Your Trial Period has expired. Please purchase a key."
RuntimeError : "Your Key has expired. Please purchase a new key."
RuntimeError : "The Network you are using in unknown and key cannot be secured. Please change networks."
RuntimeError : "Your Key is being used on a different network than it was registered on. Please use your original network or purchase a new key for this network."
ValueError : "IP list was not specified."
ValueError : "Key was not specified."إذا تلقيت خطأ مثل:
RuntimeError : "Something went really wrong. Either the IP does not exist in the database, server is down, or another error occured. Check x.x.x.x.json for more details and file an issue if you are unable to solve the problem."تقديم مشكلة حتى يتمكن فريقنا من مساعدتك.