Don't run Fix() on dropped elements
parent
35fba5ffad
commit
d3db04332e
6
morss.py
6
morss.py
|
@ -499,7 +499,6 @@ def Gather(url, cachePath, options):
|
||||||
# set
|
# set
|
||||||
startTime = time.time()
|
startTime = time.time()
|
||||||
for i, item in enumerate(rss.items):
|
for i, item in enumerate(rss.items):
|
||||||
item = Fix(item, url)
|
|
||||||
if options.progress:
|
if options.progress:
|
||||||
if MAX_ITEM == 0:
|
if MAX_ITEM == 0:
|
||||||
print '%s/%s' % (i+1, size)
|
print '%s/%s' % (i+1, size)
|
||||||
|
@ -511,7 +510,10 @@ def Gather(url, cachePath, options):
|
||||||
log('dropped')
|
log('dropped')
|
||||||
item.remove()
|
item.remove()
|
||||||
continue
|
continue
|
||||||
elif time.time() - startTime > MAX_TIME >= 0 or i+1 > MAX_ITEM >= 0:
|
|
||||||
|
item = Fix(item, url)
|
||||||
|
|
||||||
|
if time.time() - startTime > MAX_TIME >= 0 or i+1 > MAX_ITEM >= 0:
|
||||||
if not options.proxy:
|
if not options.proxy:
|
||||||
if Fill(item, cache, url, True) is False:
|
if Fill(item, cache, url, True) is False:
|
||||||
item.remove()
|
item.remove()
|
||||||
|
|
Loading…
Reference in New Issue