Skip to content

Commit

Permalink
Rm unused code for #604
Browse files Browse the repository at this point in the history
  • Loading branch information
machawk1 committed Feb 21, 2020
1 parent 5296cd5 commit 6503142
Showing 1 changed file with 0 additions and 28 deletions.
28 changes: 0 additions & 28 deletions ipwb/replay.py
Original file line number Diff line number Diff line change
Expand Up @@ -371,37 +371,9 @@ def getCDXJLinesWithURIR(urir, indexPath):

print('Getting CDXJ Lines with {0} in {1}'.format(urir, indexPath))
s = surt.surt(urir, path_strip_trailing_slash_unless_empty=False)
cdxjLinesWithURIR = []

#cdxjLineIndex = getCDXJLine_binarySearch(s, indexPath, True, True) # get i

#if cdxjLineIndex is None:
# return []

#cdxjLines = []
return getCDXJLine_binarySearch(indexPath, s)

'''with open(indexPath, 'r') as f:
cdxjLines = f.read().split('\n')
baseCDXJLine = cdxjLines[cdxjLineIndex] # via binsearch
cdxjLinesWithURIR.append(baseCDXJLine)
# Get lines before pivot that match surt
sI = cdxjLineIndex - 1
while sI >= 0:
if cdxjLines[sI].split(' ')[0] == s:
cdxjLinesWithURIR.append(cdxjLines[sI])
sI -= 1
# Get lines after pivot that match surt
sI = cdxjLineIndex + 1
while sI < len(cdxjLines):
if cdxjLines[sI].split(' ')[0] == s:
cdxjLinesWithURIR.append(cdxjLines[sI])
sI += 1
'''
return cdxjLinesWithURIR


@app.route('/timegate/<path:urir>')
def queryTimeGate(urir):
Expand Down

0 comments on commit 6503142

Please sign in to comment.