Subversion Repositories SmartDukaan

Rev

Rev 16513 | Rev 16515 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 16513 Rev 16514
Line 128... Line 128...
128
            <th>MarketPlaceUrl</th>
128
            <th>MarketPlaceUrl</th>
129
            <th>Cod</th>
129
            <th>Cod</th>
130
            </tr></thead>
130
            </tr></thead>
131
            <tbody>"""
131
            <tbody>"""
132
    for item in exceptionList:
132
    for item in exceptionList:
-
 
133
        print eval(item)
133
        message+="""<tr>
134
        message+="""<tr>
134
        <td style="text-align:center">"""+(item.identifier)+"""</td>
135
        <td style="text-align:center">"""+(item.identifier)+"""</td>
135
        <td style="text-align:center">"""+(item.category)+"""</td>
136
        <td style="text-align:center">"""+(item.category)+"""</td>
136
        <td style="text-align:center">"""+str(item.rank)+"""</td>
137
        <td style="text-align:center">"""+str(item.rank)+"""</td>
137
        <td style="text-align:center">"""+str(item.available_price)+"""</td>
138
        <td style="text-align:center">"""+str(item.available_price)+"""</td>
Line 179... Line 180...
179
        try:
180
        try:
180
            offers = fetchOffers(offerUrl)
181
            offers = fetchOffers(offerUrl)
181
        except:
182
        except:
182
            continue
183
            continue
183
        bestOffer = {}
184
        bestOffer = {}
184
        e.gross_price = offerPrice
185
        e.gross_price = float(offerPrice)
185
        effective_price = offerPrice
186
        effective_price = offerPrice
186
        coupon = ""
187
        coupon = ""
187
        for offer_data in offers.get('codes'):
188
        for offer_data in offers.get('codes'):
188
            if effective_price > offer_data.get('effective_price'):
189
            if effective_price > offer_data.get('effective_price'):
189
                effective_price = offer_data.get('effective_price')
190
                effective_price = offer_data.get('effective_price')
Line 191... Line 192...
191
                coupon = bestOffer.get('code')
192
                coupon = bestOffer.get('code')
192
        e.source_product_name = input_json['name']
193
        e.source_product_name = input_json['name']
193
        e.thumbnail = input_json['thumbnail']
194
        e.thumbnail = input_json['thumbnail']
194
        e.marketPlaceUrl = input_json['shareurl']
195
        e.marketPlaceUrl = input_json['shareurl']
195
        e.coupon = coupon
196
        e.coupon = coupon
196
        e.available_price = effective_price
197
        e.available_price = float(effective_price)
197
        
198
        
198
            
199
            
199
            
200
            
200
            
201
            
201
def main():
202
def main():