Subversion Repositories SmartDukaan

Rev

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

Rev 18054 Rev 18060
Line 394... Line 394...
394
                    if supc is None:
394
                    if supc is None:
395
                        raise
395
                        raise
396
                    else:
396
                    else:
397
                        supc = supc['identifier'] 
397
                        supc = supc['identifier'] 
398
                except:
398
                except:
399
                    #try:
399
                    try:
400
                    supc = imgUrl.split('-')[-3]
400
                        supc = imgUrl.split('-')[-3]
401
                    #except:
401
                    except:
-
 
402
                        supc = self.db.sdIdentifiers.find_one({"secondaryIdentifier":productUrl.split("/")[-1]})
-
 
403
                        if supc is None:
-
 
404
                            raise
-
 
405
                        else:
402
                        #Try to figure out supc using product url
406
                            supc = supc['identifier']
403
                        
407
                        
404
                supcMap[supc] = {'title':title, 'imgUrl':imgUrl, 'productUrl':productUrl}
408
                supcMap[supc] = {'title':title, 'imgUrl':imgUrl, 'productUrl':productUrl}
405
            except:
409
            except:
406
                pass
410
                pass
407
        return json.loads(jsonValue)
411
        return json.loads(jsonValue)