def download_data_by_id( id ):
    priceData = PriceCrawler.get_price_data_from_html( id )
    if ( priceData != None ):
        f = open( "price_data/item_ids" , "a" )
        f.write( priceData.get_name() + "," + str( id ) + "\n" )
        f.close()
        PriceWriter.write_price_data_to_csv( "price_data/master_list/" + str(id) + ".csv" , priceData )
Beispiel #2
0
 def download_data_by_name_and_id(name, id):
     data = PriceCrawler.get_price_data_from_json(name, id)
     if (data != None):
         PriceWriter.save_data(data)
     else:
         raise "Invalid commodity name or id."
 def download_data_by_name_and_id( name , id ):
     data = PriceCrawler.get_price_data_from_json( name , id )
     if ( data != None ) :
         PriceWriter.save_data( data )
     else :
         raise "Invalid commodity name or id."