Subversion Repositories SmartDukaan

Rev

Rev 264 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 264 Rev 274
Line 181... Line 181...
181
        """
181
        """
182
        Documentation for method get_all_infibeam_data 
182
        Documentation for method get_all_infibeam_data 
183
        This method is used to retrieve all the phones in infibeam's table
183
        This method is used to retrieve all the phones in infibeam's table
184
        """
184
        """
185
        cid = self.get_latestcrawlerid()
185
        cid = self.get_latestcrawlerid()
186
        phones = infibeam_data.query.filter_by(crawl_id=cid)
186
        phones = infibeam_data.query.filter_by(crawl_id=cid).all()
187
        return phones
187
        return phones
188
        
188
        
189
    def add_univervendor(self,name,site):
189
    def add_univervendor(self,name,site):
190
        """
190
        """
191
        Documentation for method add_univervendor 
191
        Documentation for method add_univervendor 
Line 209... Line 209...
209
        """
209
        """
210
        Documentation for method get_all_univervendor 
210
        Documentation for method get_all_univervendor 
211
        This method is used to retrieve all the vendors in univercell's table
211
        This method is used to retrieve all the vendors in univercell's table
212
        """
212
        """
213
        cid = self.get_latestcrawlerid()
213
        cid = self.get_latestcrawlerid()
214
        vi = univercell_data.query.filter_by(crawl_id=cid)
214
        vi = univercell_data.query.filter_by(crawl_id=cid).all()
215
        return vi
215
        return vi
216
        
216
        
217
    def add_new_univerphone(self,name,shown_price,final_price):
217
    def add_new_univerphone(self,name,shown_price,final_price):
218
        """
218
        """
219
        Documentation for method add_univerphone 
219
        Documentation for method add_univerphone 
Line 239... Line 239...
239
        """
239
        """
240
        Documentation for method get_all_univercell_phones 
240
        Documentation for method get_all_univercell_phones 
241
        This method is used to retrieve all the phones in univercell's table
241
        This method is used to retrieve all the phones in univercell's table
242
        """
242
        """
243
        cid = self.get_latestcrawlerid()
243
        cid = self.get_latestcrawlerid()
244
        phones = univercell_items.query.filter_by(crawl_id=cid)
244
        phones = univercell_items.query.filter_by(crawl_id=cid).all()
245
        return phones
245
        return phones
246
            
246
            
247
    def add_naaptolurl(self,url):
247
    def add_naaptolurl(self,url):
248
        """
248
        """
249
        Documentation for method add_naaptolurl 
249
        Documentation for method add_naaptolurl 
Line 266... Line 266...
266
        """
266
        """
267
        Documentation for method get_allnaaptolurls 
267
        Documentation for method get_allnaaptolurls 
268
        This method is used to retrieve all the url for phones in naaptol's table
268
        This method is used to retrieve all the url for phones in naaptol's table
269
        """
269
        """
270
        cid = self.get_latestcrawlerid()
270
        cid = self.get_latestcrawlerid()
271
        ai = naaptolurls.query.filter_by(crawl_id=cid)
271
        ai = naaptolurls.query.filter_by(crawl_id=cid).all()
272
        return ai
272
        return ai
273
    
273
    
274
    def add_morenaaptolurl(self,url):
274
    def add_morenaaptolurl(self,url):
275
        """
275
        """
276
        Documentation for method add_morenaaptolurl 
276
        Documentation for method add_morenaaptolurl 
Line 300... Line 300...
300
        """
300
        """
301
        Documentation for method get_allmorenaaptolurls 
301
        Documentation for method get_allmorenaaptolurls 
302
        This method is used to retrieve all the extra urls for phones in naaptol's table
302
        This method is used to retrieve all the extra urls for phones in naaptol's table
303
        """
303
        """
304
        cid = self.get_latestcrawlerid()
304
        cid = self.get_latestcrawlerid()
305
        ai = morenaaptolurls.query.filter_by(crawl_id=cid)
305
        ai = morenaaptolurls.query.filter_by(crawl_id=cid).all()
306
        return ai
306
        return ai
307
        
307
        
308
            
308
            
309
    def add_new_naaptolphone(self,name,range):
309
    def add_new_naaptolphone(self,name,range):
310
        """
310
        """
Line 342... Line 342...
342
        """
342
        """
343
        Documentation for method get_allnaaptolphones 
343
        Documentation for method get_allnaaptolphones 
344
        This method is used to retrieve all the phone in naaptol's table
344
        This method is used to retrieve all the phone in naaptol's table
345
        """
345
        """
346
        cid = self.get_latestcrawlerid()
346
        cid = self.get_latestcrawlerid()
347
        ai = naaptolphones.query.filter_by(crawl_id=cid)
347
        ai = naaptolphones.query.filter_by(crawl_id=cid).all()
348
        return ai    
348
        return ai    
349
    
349
    
350
    def add_new_ntonlinesp(self,nid,name,price):
350
    def add_new_ntonlinesp(self,nid,name,price):
351
        """
351
        """
352
        Documentation for method add_new_ntonlinesp 
352
        Documentation for method add_new_ntonlinesp 
Line 372... Line 372...
372
        """
372
        """
373
        Documentation for method get_allntonlinesp 
373
        Documentation for method get_allntonlinesp 
374
        This method is used to retrieve all the online-suppliers in naaptol's table
374
        This method is used to retrieve all the online-suppliers in naaptol's table
375
        """
375
        """
376
        cid = self.get_latestcrawlerid()
376
        cid = self.get_latestcrawlerid()
377
        ai = ntonlinesp.query.filter_by(crawl_id=cid)
377
        ai = ntonlinesp.query.filter_by(crawl_id=cid).all()
378
        return ai
378
        return ai
379
    
379
    
380
    def get_ntonlinespbynid(self,nid):
380
    def get_ntonlinespbynid(self,nid):
381
        """
381
        """
382
        Documentation for method get_allntonlinespbynid 
382
        Documentation for method get_allntonlinespbynid 
383
        This method is used to retrieve all the online-supplier for a particular phone 
383
        This method is used to retrieve all the online-supplier for a particular phone 
384
        in naaptol's table given the id of phone in naaptolphones
384
        in naaptol's table given the id of phone in naaptolphones
385
        """
385
        """
386
        cid = self.get_latestcrawlerid()
386
        cid = self.get_latestcrawlerid()
387
        ai = ntonlinesp.query.filter_by(crawl_id=cid)
387
        ai = ntonlinesp.query.filter_by(crawl_id=cid).all()
388
        return ai
388
        return ai
389
    
389
    
390
    def add_new_ntofflinesp(self,nid,name,price):
390
    def add_new_ntofflinesp(self,nid,name,price):
391
        """
391
        """
392
        Documentation for method add_new_ntofflinesp 
392
        Documentation for method add_new_ntofflinesp 
Line 413... Line 413...
413
        """
413
        """
414
        Documentation for method get_allntofflinesp 
414
        Documentation for method get_allntofflinesp 
415
        This method is used to retrieve all the offline-suppliers in naaptol's table
415
        This method is used to retrieve all the offline-suppliers in naaptol's table
416
        """
416
        """
417
        cid = self.get_latestcrawlerid()
417
        cid = self.get_latestcrawlerid()
418
        ai = ntofflinesp.query.filter_by(crawl_id=cid)
418
        ai = ntofflinesp.query.filter_by(crawl_id=cid).all()
419
        return ai
419
        return ai
420
    
420
    
421
    def get_ntofflinespbynid(self,nid):
421
    def get_ntofflinespbynid(self,nid):
422
        """
422
        """
423
        Documentation for method get_allntolinespbynid 
423
        Documentation for method get_allntolinespbynid 
424
        This method is used to retrieve all the offline-supplier for a particular phone 
424
        This method is used to retrieve all the offline-supplier for a particular phone 
425
        in naaptol's table given the id of phone in naaptolphones
425
        in naaptol's table given the id of phone in naaptolphones
426
        """
426
        """
427
        ai = ntofflinesp.query.filter_by(nid=nid)
427
        ai = ntofflinesp.query.filter_by(nid=nid)
428
        cid = self.get_latestcrawlerid()
428
        cid = self.get_latestcrawlerid()
429
        ai = ai.filter_by(crawl_id=cid)
429
        ai = ai.filter_by(crawl_id=cid).all()
430
        return ai
430
        return ai
431
    
431
    
432
    def add_new_mobstorephone_new(self,name,shown_pr,final_pr,extra_info):
432
    def add_new_mobstorephone_new(self,name,shown_pr,final_pr,extra_info):
433
        """
433
        """
434
        Documentation for method add_new_mobstorephone_new 
434
        Documentation for method add_new_mobstorephone_new 
Line 453... Line 453...
453
        """
453
        """
454
        Documentation for method get_allmobstorephone_new 
454
        Documentation for method get_allmobstorephone_new 
455
        This method is used to retrieve all the phones in themobilestore's table
455
        This method is used to retrieve all the phones in themobilestore's table
456
        """
456
        """
457
        cid = self.get_latestcrawlerid()
457
        cid = self.get_latestcrawlerid()
458
        ai = themobilestorephones_new.query.filter_by(crawl_id=cid)
458
        ai = themobilestorephones_new.query.filter_by(crawl_id=cid).all()
459
        return ai
459
        return ai
460
    
460
    
461
    def add_babuchakurl(self,url,no_pages):
461
    def add_babuchakurl(self,url,no_pages):
462
        """
462
        """
463
        Documentation for method add_babuchakurl 
463
        Documentation for method add_babuchakurl 
Line 480... Line 480...
480
        """
480
        """
481
        Documentation for method get_allbabuchakurls 
481
        Documentation for method get_allbabuchakurls 
482
        This method is used to retrieve all the vendor-urls in babuchak's table
482
        This method is used to retrieve all the vendor-urls in babuchak's table
483
        """
483
        """
484
        cid = self.get_latestcrawlerid()
484
        cid = self.get_latestcrawlerid()
485
        ai = babuchak_urls.query.filter_by(crawl_id=cid)
485
        ai = babuchak_urls.query.filter_by(crawl_id=cid).all()
486
        return ai
486
        return ai
487
    
487
    
488
    def add_babuchakphoneurl(self,url):
488
    def add_babuchakphoneurl(self,url):
489
        """
489
        """
490
        Documentation for method add_babuchakphoneurl 
490
        Documentation for method add_babuchakphoneurl 
Line 506... Line 506...
506
        """
506
        """
507
        Documentation for method get_allbabuchakphoneurls 
507
        Documentation for method get_allbabuchakphoneurls 
508
        This method is used to retrieve all the phone-urls in babuchak's table
508
        This method is used to retrieve all the phone-urls in babuchak's table
509
        """
509
        """
510
        cid = self.get_latestcrawlerid()
510
        cid = self.get_latestcrawlerid()
511
        ai = babuchak_phoneurls.query.filter_by(crawl_id=cid)
511
        ai = babuchak_phoneurls.query.filter_by(crawl_id=cid).all()
512
        return ai
512
        return ai
513
        
513
        
514
    def add_babuchakphone(self,name,shown_price,final_price):
514
    def add_babuchakphone(self,name,shown_price,final_price):
515
        """
515
        """
516
        Documentation for method add_babuchakphone 
516
        Documentation for method add_babuchakphone 
Line 534... Line 534...
534
        """
534
        """
535
        Documentation for method get_allbabuchakphones 
535
        Documentation for method get_allbabuchakphones 
536
        This method is used to retrieve all the phone in babuchak's table
536
        This method is used to retrieve all the phone in babuchak's table
537
        """
537
        """
538
        cid = self.get_latestcrawlerid()
538
        cid = self.get_latestcrawlerid()
539
        ai = babuchak_phones.query.filter_by(crawl_id=cid)
539
        ai = babuchak_phones.query.filter_by(crawl_id=cid).all()
540
        return ai       
540
        return ai       
541
    
541
    
542
    def add_ipbasic(self,name,site):
542
    def add_ipbasic(self,name,site):
543
        """
543
        """
544
        Documentation for method add_ipbasic 
544
        Documentation for method add_ipbasic 
Line 562... Line 562...
562
        """
562
        """
563
        Documentation for method get_all_ipbasic 
563
        Documentation for method get_all_ipbasic 
564
        This method is used to retrieve all phone-urls in indiaplaza's table
564
        This method is used to retrieve all phone-urls in indiaplaza's table
565
        """
565
        """
566
        cid = self.get_latestcrawlerid()
566
        cid = self.get_latestcrawlerid()
567
        vi = indiaplaza_data.query.filter_by(crawl_id=cid)
567
        vi = indiaplaza_data.query.filter_by(crawl_id=cid).all()
568
        return vi
568
        return vi
569
        
569
        
570
    def add_ipextra(self,name,shown_price,final_price,guarantee,shipinfo):
570
    def add_ipextra(self,name,shown_price,final_price,guarantee,shipinfo):
571
        """
571
        """
572
        Documentation for method add_ipextra 
572
        Documentation for method add_ipextra 
Line 596... Line 596...
596
        """
596
        """
597
        Documentation for method get_all_indiaplaza_phones 
597
        Documentation for method get_all_indiaplaza_phones 
598
        This method is used to retrieve all the phones in indiaplaza's table
598
        This method is used to retrieve all the phones in indiaplaza's table
599
        """
599
        """
600
        cid = self.get_latestcrawlerid()
600
        cid = self.get_latestcrawlerid()
601
        phones = indiaplaza_items.query.filter_by(crawl_id=cid)
601
        phones = indiaplaza_items.query.filter_by(crawl_id=cid).all()
602
        return phones
602
        return phones
603
                
603
                
604
    def set_extra_vars(self,var,val,desc):    
604
    def set_extra_vars(self,var,val,desc):    
605
        """
605
        """
606
        Documentation for method set_extra_vars  
606
        Documentation for method set_extra_vars  
Line 722... Line 722...
722
        """
722
        """
723
        Documentation for method get_all_models 
723
        Documentation for method get_all_models 
724
        This method is used to retrieve all the model from the model's table
724
        This method is used to retrieve all the model from the model's table
725
        """
725
        """
726
        cid = self.get_latestcrawlerid()
726
        cid = self.get_latestcrawlerid()
727
        mod = models.query.filter_by(crawl_id=cid)
727
        mod = models.query.filter_by(crawl_id=cid).all()
728
        return mod
728
        return mod
729
    
729
    
730
    def get_modId(self,brand,model):
730
    def get_modId(self,brand,model):
731
        """
731
        """
732
        Documentation for method get_modId 
732
        Documentation for method get_modId 
Line 796... Line 796...
796
        """
796
        """
797
        Documentation for method get_all_prices 
797
        Documentation for method get_all_prices 
798
        This method is used to retrieve all the info for all the phones in prices's table
798
        This method is used to retrieve all the info for all the phones in prices's table
799
        """
799
        """
800
        cid = self.get_latestcrawlerid()
800
        cid = self.get_latestcrawlerid()
801
        pr = prices.query.filter_by(crawl_id=cid)
801
        pr = prices.query.filter_by(crawl_id=cid).all()
802
        return pr
802
        return pr
803
    
803
    
804
    def get_prbyId(self,id):
804
    def get_prbyId(self,id):
805
        """
805
        """
806
        Documentation for method get_prbyId 
806
        Documentation for method get_prbyId 
Line 873... Line 873...
873
        """
873
        """
874
        Documentation for method get_all_gs_info 
874
        Documentation for method get_all_gs_info 
875
        This method is used to retrieve guarantee and ship info for all the phones 
875
        This method is used to retrieve guarantee and ship info for all the phones 
876
        """
876
        """
877
        cid = self.get_latestcrawlerid()
877
        cid = self.get_latestcrawlerid()
878
        gsi = guarantee_info.query.filter_by(crawl_id=cid)
878
        gsi = guarantee_info.query.filter_by(crawl_id=cid).all()
879
        return gsi
879
        return gsi
880
    
880
    
881
    def get_gs_bymid(self,mid):
881
    def get_gs_bymid(self,mid):
882
        """
882
        """
883
        Documentation for method get_gs_bymid 
883
        Documentation for method get_gs_bymid