Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit

Permalink
Update gen_stat.py
Browse files Browse the repository at this point in the history
md5 package is deprecated. replace it with hashlib.md5
  • Loading branch information
fanchyna committed May 5, 2016
1 parent a2e83d0 commit b81b96a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crawler/code_base/stat/gen_stat.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import os
import sys
import md5
from hashlib import md5
import re
import urlparse

Expand Down Expand Up @@ -134,7 +134,7 @@ def load_ncites_data(ncites_file_path):
for line in f:
parts = line[:-1].split('\t')
url = get_canonical_url(parts[0])
code = md5.new(url).hexdigest()
code = md5(url).hexdigest()
cite_num = int(parts[1])
if code not in ncites:
ncites[code] = cite_num
Expand Down

0 comments on commit b81b96a

Please sign in to comment.