Commit de8f53c4 authored by Renán Sosa Guillen's avatar Renán Sosa Guillen

crawl backwards

parent cb47d3dd
......@@ -7,10 +7,8 @@ import datetime
today = datetime.datetime.now()
# baseDir = "/home/geoint/virtualHDD/m3/noticias/"
# scrapyDir = "/home/geoint/crawlersNoticias/"
baseDir = "/home/cna_service/noticias/"
scrapyDir = "/home/cna_service/crawler/crawlersNoticias/"
baseDir = "/home/geoint/virtualHDD/m3/noticias/"
scrapyDir = "/home/geoint/crawlersNoticias/"
with open(sys.argv[1]) as data_file:
siteList = json.load(data_file)
os.chdir(baseDir)
......@@ -27,6 +25,8 @@ with open(sys.argv[1]) as data_file:
lstYears.sort()
if len(lstYears) > 0:
year = int(lstYears[len(lstYears)-1])
else:
year = today.date().year
print year
try:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment