Skip to content

Commit 3a94435

Browse files
committed
Minor update
1 parent d6bac36 commit 3a94435

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

thirdparty/pagerank/pagerank.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
#
1313
# Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php
1414

15+
import sys
1516
import urllib
1617

1718
def get_pagerank(url):
@@ -77,3 +78,9 @@ def check_hash(hash_int):
7778
check_byte >>= 1
7879

7980
return '7' + str(check_byte) + hash_str
81+
82+
def main():
83+
print get_pagerank(sys.argv[1]) if len(sys.argv) > 1 else "[x] missing hostname"
84+
85+
if __name__ == "__main__":
86+
main()

0 commit comments

Comments
 (0)