-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add url analysis support (#33)
* feat: add url analysis support Co-authored-by: Jonathan Abrahamy <[email protected]>
- Loading branch information
1 parent
2b76a4d
commit d4fad0d
Showing
20 changed files
with
662 additions
and
270 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import sys | ||
from pprint import pprint | ||
|
||
from intezer_sdk import api | ||
from intezer_sdk.analysis import UrlAnalysis | ||
|
||
|
||
def send_url_with_wait(url): | ||
api.set_global_api('<api_key>') | ||
analysis = UrlAnalysis(url=url) | ||
analysis.send(wait=True) | ||
pprint(analysis.result()) | ||
|
||
|
||
def send_url_without_wait(url): | ||
api.set_global_api('<api_key>') | ||
analysis = UrlAnalysis(url=url) | ||
analysis.send() | ||
analysis.wait_for_completion() | ||
pprint(analysis.result()) | ||
|
||
|
||
if __name__ == '__main__': | ||
send_file_with_wait(*sys.argv[1:]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
__version__ = '1.6.10' | ||
__version__ = '1.7.0' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import warnings | ||
|
||
|
||
def deprecated(message: str): | ||
def wrapper(func): | ||
warnings.warn(message, | ||
DeprecationWarning, | ||
stacklevel=2) | ||
return func | ||
|
||
return wrapper |
Oops, something went wrong.