예제 #1
0
    def __init__(self):
        'Stores database, last page parsed, and coverart class'
        
        try:    
            load_data = open('WQHSdata.txt', 'rU')   # load dictionary      
            self.data = literal_eval(load_data.read())
            load_data.close()
        except IOError: # if file not found, make it
            self.data = {}           
            save = open('WQHSdata.txt', 'w')
            save.write(str(self.data))
            save.close()
            
        try:                                  
            load_last = open('last_page.txt', 'rU')   # load last page parsed
            self.last_page = eval(load_last.read())
            load_last.close()                     
        except IOError: # if file not found, or first time running, make it
            self.last_page = '2'
            save = open('last_page.txt', 'w')
            save.write(self.last_page)
            save.close()
        
        self.today = date.today()
        self.today = self.today.isocalendar()

        CoverSourceBase.__init__(self)
        self.source_name = 'Last.FM'
        self.api_key = '2f63459bcb2578a277c5cf5ec4ca62f7'
        self.url_base = 'http://ws.audioscrobbler.com/2.0/?method=album.search&api_key=%s' % self.api_key
예제 #2
0
    def __init__(self):
        'Stores database'
        
        self.data = {}
        self.today = date.today()
        self.today = self.today.isocalendar()
        self.last_page = 2 # page number that was last parsed

        CoverSourceBase.__init__(self)
        self.source_name = 'Last.FM'
        self.api_key = '2f63459bcb2578a277c5cf5ec4ca62f7'
        self.url_base = 'http://ws.audioscrobbler.com/2.0/?method=album.search&api_key=%s' % self.api_key
예제 #3
0
 def __init__(self):
     CoverSourceBase.__init__(self)
     self.source_name = 'Last.FM'
     self.api_key = '2f63459bcb2578a277c5cf5ec4ca62f7'
     self.url_base = 'http://ws.audioscrobbler.com/2.0/?method=album.search&api_key=%s' % self.api_key
예제 #4
0
 def __init__(self):
     CoverSourceBase.__init__(self)
     self.source_name = 'Amazon'
     self.url_base = 'http://free.apisigning.com/onca/xml'
     self.key = 'AKIAJVIEODBXLUUDP3VQ'
     self.xmlns = 'http://webservices.amazon.com/AWSECommerceService/2005-10-05'
예제 #5
0
 def __init__(self):
     CoverSourceBase.__init__(self)
     self.source_name = 'Yahoo!'
     self.appid = 'VRmspbXV34FFL7cFtXA0A901F6pU.QAXlG.tMPN7i3G2qc_8ShbS5SixFPkUlASWuw--'
     self.url_base = 'http://search.yahooapis.com'
     self.xmlns = 'urn:yahoo:srchmi'
예제 #6
0
 def __init__(self):
     CoverSourceBase.__init__(self)
     self.source_name = 'Discogs'
     self.url_base = 'http://www.discogs.com'
예제 #7
0
 def __init__(self):
     CoverSourceBase.__init__(self)
     self.source_name = 'AllCDCovers'
     self.url_base = 'http://www.allcdcovers.com'
예제 #8
0
 def __init__(self):
     CoverSourceBase.__init__(self)
     self.url_base = 'http://www.walmart.com'
     self.source_name = 'Walmart'