Ejemplo n.º 1
0
			self.teams[self.use]['html'] = data
			
			results = download.download_promo(self.teams[self.use], self.use)
			print('Downloading promo     for {0}: \t link: {1}'.format(self.use, self.teams[self.use]['promo']))
		#else:
		#	print("Error while downloading %s\nSkipping."%self.currentUrl())
		if self.urlList:            
			self.currentTeam()
		else:

			self.done.emit()

app = QApplication(sys.argv)
MainWindow = QtGui.QMainWindow()

teams, overall, downloadedFiles = download.load_teams()

for team in teams.keys():
	teams[team]['html'] = ''

date = time.strftime("_%m_%d_%Y")

teams2 = dict(teams)

for team in teams2.keys():
	directory = os.path.join('Data', date, 'Promo', team+date+".csv")
	if os.path.exists(directory):
		del teams[team]
		print("Already got it team {0}: url - {1}".format(team, teams2[team]['promo']))

downloader = Downloader(sorted(list(teams.keys())), teams)
Ejemplo n.º 2
0
 def handleAlt(self, command):
     import download
     self.normalOutputWritten('Started downloading Everything: {0}\n\n\n'.format(datetime.datetime.now().strftime('%A %B, %Y: %H:%M:%S %p')))
     teams, overall, downloadedFiles = download.load_teams()
     download.processGUI(self.command, teams, overall, downloadedFiles, 'email_sum')
Ejemplo n.º 3
0
 def handleFalse(self, command):
     import download
     self.normalOutputWritten('Started downloading {0}: {1}\n\n\n'.format(self.command, datetime.datetime.now().strftime('%A %B, %Y: %H:%M:%S %p')))
     teams, overall, downloadedFiles = download.load_teams()
     download.processGUI(self.command, teams, overall, downloadedFiles, False)
Ejemplo n.º 4
0
from PyQt4.QtWebKit import *
import download
import datetime
import time
import os
import sys

date = time.strftime("_%m_%d_%Y")
directory = os.path.abspath(os.path.join(os.path.dirname(sys.argv[0]), 'Data', date))

if not os.path.exists(directory):
    os.makedirs(directory)
f = open(directory+'/Log.txt', 'a')

sys.stdout = f
teams, overall, downloadedFiles = download.load_teams()

try:
    _fromUtf8 = QtCore.QString.fromUtf8
except AttributeError:
    def _fromUtf8(s):
        return s

try:
    _encoding = QtGui.QApplication.UnicodeUTF8

    def _translate(context, text, disambig):
        return QtGui.QApplication.translate(context, text, disambig, _encoding)
except AttributeError:

    def _translate(context, text, disambig):