Skip to content

5.5. Google Shops

Javinator9889 edited this page Aug 13, 2018 · 3 revisions
  • withShopOptions(self, params: GoogleShop): defines the ShopParams for doing a search at Google Shops. A GoogleShop object must be created.

GoogleShop

from pyGle.values import GoogleShop
  • onlyNewProducts(self): search only for new products.
  • orderByLowerToHigherPrice(self): order results from lower to higher price.
  • orderByHigherToLowerPrice(self): order results from higher to lower price.
  • orderByReviewScore(self): order results by the review score of each one.
  • withMinPrice(self, price: int): define the lower price with an int.
  • withMaxPrice(self, price: int): define the higher price with an int.
  • betweenTwoPrices(self, min_price: int, max_price: int): defines a lower and higher price with both int.

List output format

Here is the format of the results, when job finishes:

[    {
          'title': 'article title',
          'link': 'article link',
          'thumbnail': 'article thumbnail',
          'price': 'article price',
          'score': 'article score',
          'description': 'article description'
     },
     {
          'how_many_results': 'number of results found',
          'stats':    {
                            'overall_time': 'total time',
                            'google_search_time': 'Google searching time',
                            'parsing_page_time': 'time for parsing the results'
                      },
          'url': 'Google Shops URL'
     }
]

<<< Previous page - Next page >>>