Conditions | 1 |
Total Lines | 16 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | import gzip |
||
34 | def lookup(self, url: str): |
||
35 | """ |
||
36 | To check URLs from PhishTank |
||
37 | |||
38 | :param url: URL |
||
39 | :return: dict |
||
40 | """ |
||
41 | header = {"user-agent": "phishtank/{}".format(self.username)} |
||
42 | |||
43 | query_data = { |
||
44 | "url": url, |
||
45 | "format": "json", |
||
46 | "app_key": self.api_key |
||
47 | } |
||
48 | |||
49 | return requests.post(self.api_url, headers=header, params=query_data) |
||
50 | |||
60 |