IPGeo Search
v1.0.1: Updated redundancy
IPGEO 검색은 IPGEO API를 쉽게 사용할 수있는 파이썬 모듈입니다. 무료 및 유료 사용자가 하나의 코드 한 줄만 서버에 요청을 보낼 수 있으므로 IP 목록이로드되는 방식을 사용자 정의 할 수 있습니다. 우리는 웹 페이지에서 API에 대한 5 일 무료 평가판을 제공합니다. 무료 평가판 API 키를 얻으려면 실험실에 문의하시면 귀하에게 보내드립니다.
ipgeosearch를 설치하려면 실행하십시오
pip install IPGeoSearch 로컬 컴퓨터에서 실행하기 전에 최신 버전의 pandas 설치된 python 3.6+ 있는지 확인하십시오.
팬더를 설치하려면 실행하십시오.
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."우리 팀이 당신을 도울 수 있도록 문제를 제기하십시오.