From 3a94435cce85fa1a17c1c4a2d4c13d75f663f6ed Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Thu, 18 Feb 2016 13:56:47 +0100 Subject: [PATCH] Minor update --- thirdparty/pagerank/pagerank.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/thirdparty/pagerank/pagerank.py b/thirdparty/pagerank/pagerank.py index 977a93744..fed4dcc84 100644 --- a/thirdparty/pagerank/pagerank.py +++ b/thirdparty/pagerank/pagerank.py @@ -12,6 +12,7 @@ # # Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php +import sys import urllib def get_pagerank(url): @@ -77,3 +78,9 @@ def check_hash(hash_int): check_byte >>= 1 return '7' + str(check_byte) + hash_str + +def main(): + print get_pagerank(sys.argv[1]) if len(sys.argv) > 1 else "[x] missing hostname" + +if __name__ == "__main__": + main()