Package: python-smartprice
python-smartpriceA simple scraping-based python library for MySmartPrice - price comparison site.IntroductionMySmartPriceis a platform which provided best seller price across a wide array of categories that include Mobiles, Electronics, Computers, Fashion and Lifestyle, Cameras, Books, Appliances and Personal Care.Installationpip installpython-smartpricePrerequisitesRequestsBeautifulSoup 4Python 2.7+QuickstartGET PRICE LISTCheck all the belowSupported attributes.>>>frompysmartprice.baseimportSmartPrice>>>smartprice=SmartPrice()>>>len(smartprice.samsung_mobiles)Out[5]:142>>>smartprice.samsung_mobilesOut[6]:[<pysmartprice.results.SmartPriceResultat0x10df46f90>,<pysmartprice.results.SmartPriceResultat0x10df46fd0>,<pysmartprice.results.SmartPriceResultat0x10df50050>,<pysmartprice.results.SmartPriceResultat0x10df50090>,<pysmartprice.results.SmartPriceResultat0x10df500d0>,<pysmartprice.results.SmartPriceResultat0x10df50110>,<pysmartprice.results.SmartPriceResultat0x10df50150>,<pysmartprice.results.SmartPriceResultat0x10df50190>]>>>samsung_mobile=smartprice.samsung_mobiles[0]>>>samsung_mobile.titleOut[7]:u'Samsung Galaxy J7'>>>samsung_mobile.best_priceOut[8]:'14,299'>>>samsung_mobile.dumptojsonOut[9]:{u'best_price':u'14,664',u'img':u'http://c0028545.cdn1.cloudfiles.rackspacecloud.com/7178-7-thumb.jpg',u'product_id':u'7178',u'title':u'\nSamsung Galaxy J7\n',u'url':u'http://www.mysmartprice.com/mobile/samsung-galaxy-j7-msp7178'}SEARCH PRICE LIST>>>frompysmartprice.baseimportSmartPrice>>>smartprice=SmartPrice()>>>smartprice.search('SAMSUNG')Out[4]:[<pysmartprice.results.SmartPriceResultat0x102b05990>,<pysmartprice.results.SmartPriceResultat0x100d36850>,<pysmartprice.results.SmartPriceResultat0x1024129d0>,<pysmartprice.results.SmartPriceResultat0x102412b10>,<pysmartprice.results.SmartPriceResultat0x102412f90>,<pysmartprice.results.SmartPriceResultat0x102412fd0>,<pysmartprice.results.SmartPriceResultat0x102412e10>,<pysmartprice.results.SmartPriceResultat0x102412d50>,<pysmartprice.results.SmartPriceResultat0x102412c50>,...]In[3]:len(s.search('SAMSUNG'))Out[3]:1012In[3]:results=s.search('SAMSUNG')In[4]:results[0].dumptojsonOut[4]:{u'best_price':u'14,664',u'img':u'http://c0028545.cdn1.cloudfiles.rackspacecloud.com/7178-7-thumb.jpg',u'product_id':u'7178',u'title':u'\nSamsung Galaxy J7\n',u'url':u'http://www.mysmartprice.com/mobile/samsung-galaxy-j7-msp7178'}GET SELLERS DETAILS>>frompysmartprice.baseimportSmartPrice>>smartprice=SmartPrice()>>results=smartprice.sellers('Samsung Galaxy J2')>>resultsOut[4]:[<pysmartprice.results.SmartPriceResultat0x109eca590>]In[5]:results[0].dumptojsonOut[5]:{'best_price':'8,199','img':'http://c0028545.cdn1.cloudfiles.rackspacecloud.com/7448-6-thumb.jpg','product_id':'7448','title':'Samsung Galaxy J2','sellers':[{'logo':u'http://c223968.r68.cf1.rackcdn.com/syberplace_store.png','name':u'Seller:\nSyberplace','price':u'8,199','rating':u'5/5'},{'logo':u'http://c223968.r68.cf1.rackcdn.com/amazon_store.png','name':u'Seller:Amazon Seller','price':u'8,330','rating':u'4.5/5'},{'logo':u'http://c223968.r68.cf1.rackcdn.com/ebay_store.png','name':u'Seller:Bberry.stores','price':u'8,215','rating':u'5/5'},{'logo':u'http://c223968.r68.cf1.rackcdn.com/paytm_store.png','name':u'Seller:RYAISHA RETAILS PVT LTD','price':u'8,496','rating':u'3.2/5'},{'logo':u'http://c223968.r68.cf1.rackcdn.com/indiatimes_store.png','name':u'Seller:Indiatimes','price':u'8,314','rating':u'2.5/5'},{'logo':u'http://c223968.r68.cf1.rackcdn.com/flipkart_store.png','name':u'Seller:WS Retail','price':u'8,499','rating':u'4.2/5'}],'url':'http://www.mysmartprice.com/mobile/samsung-galaxy-j2-msp7448'}Supported attributesGet the best prices for the below attributesmobilessamsung_mobilesnokia_mobilesmicromax_mobilesiphoneshtc_mobilestabletssamsung_tabletslenovo_tabletsmicromax_tabletsapple_ipadslaptopshp_laptopsdell_laptopslenovo_laptopssony_laptopstoshiba_laptopsmacbookssamsung_laptopstvssamsung_tvssony_tvslg_tvspanasonic_tvssharp_tvs