Beispiel #1
0
def getCalendar():
   #Now begin the process of querying the db
   global imageCollector
   semester = request.forms.get("hashtag")
   dbHandler.init(True) #Clear the database

   #   p = Process(target=imageCollector.run())
#   p.start()

   urls = open("images.txt","r").read().replace('\n','').split(',')
   templ = open('template/slideshow.tmpl','r').read()

#   return bottle.template(templ, urls=urls)
   return bottle.static_file('slideshow.tmpl',root='template/')
import time

from database import dbHandler
from scraper import spiderworker

if __name__ == "__main__":
    dbHandler.init()

    #    scraperWorker = spiderworker.SpiderWorker()
    scraperWorker = spiderworker.simpleWorker()
    scraperWorker.runProcess()
#    scraperWorker.start()
#
#    try:
#        while True:
#            time.sleep(1)
#    except:
#        scraperWorker.end()
#        scraperWorker.join()
import time

from database import dbHandler
from scraper import spiderworker

if __name__ == "__main__":
    dbHandler.init()

#    scraperWorker = spiderworker.SpiderWorker()
    scraperWorker = spiderworker.simpleWorker()
    scraperWorker.runProcess()
#    scraperWorker.start()
#    
#    try:
#        while True:
#            time.sleep(1)
#    except:
#        scraperWorker.end()
#        scraperWorker.join()