get the authorization for the authentication token, you have to login before you can access the API, this is where the 'lifted' creds come into play.
(self)
| 42 | return token.strip() |
| 43 | |
| 44 | def __get_auth(self): |
| 45 | """ |
| 46 | get the authorization for the authentication token, you have to login |
| 47 | before you can access the API, this is where the 'lifted' creds come into |
| 48 | play. |
| 49 | """ |
| 50 | username = self.__decode(self.user_file) |
| 51 | password = self.__decode(self.pass_file) |
| 52 | data = {"username": username, "password": password} |
| 53 | req = requests.post(API_URLS["zoomeye"][0], json=data) |
| 54 | token = json.loads(req.content) |
| 55 | return token |
| 56 | |
| 57 | def search(self): |
| 58 | """ |