%global _empty_manifest_terminate_build 0 Name: python-amazon-buddy Version: 2.0.29 Release: 1 Summary: python wrapper for the amazon_buddy npm package License: MIT License URL: https://github.com/kkristof200/py_amazon_buddy Source0: https://mirrors.nju.edu.cn/pypi/web/packages/19/8c/2ad8c21034e0bdbf82640db82d166dc81c33231daf712f4c33c94eb50e4d/amazon_buddy-2.0.29.tar.gz BuildArch: noarch Requires: python3-beautifulsoup4 Requires: python3-jsoncodable Requires: python3-kcu Requires: python3-ksimpleapi Requires: python3-noraise Requires: python3-requests Requires: python3-Unidecode %description # amazon_buddy ![python_version](https://img.shields.io/static/v1?label=Python&message=3.5%20|%203.6%20|%203.7&color=blue) [![PyPI downloads/month](https://img.shields.io/pypi/dm/amazon_buddy?logo=pypi&logoColor=white)](https://pypi.python.org/pypi/amazon_buddy) ## Description Amazon scraper. ## Install ~~~~bash pip install amazon_buddy # or pip3 install amazon_buddy ~~~~ ## Usage ~~~~python from amazon_buddy import Product, AmazonBuddy, Category, SortType ab = AmazonBuddy(debug=True, user_agent='ADD_USER_AGENT') # # products = ab.search_products( # # 'face wash', # # sort_type=SortType.PRICE_HIGH_TO_LOW, # # min_price=0, # # category=Category.BEAUTY_AND_PERSONAL_CARE, # # max_results=20 # # ) # # print(len(products)) asin = 'B07RZV9LB7' # # reviews = ab.get_reviews(asin=asin) # # print(reviews) ab.get_product_details(asin).save('{}.json'.format(asin)) # ab.get_product_details(asin).jsonprint() # Product.load('/Users/kristofk/github/py_amazon_buddy/B0758GYJK2.json').jsonprint() ~~~~ %package -n python3-amazon-buddy Summary: python wrapper for the amazon_buddy npm package Provides: python-amazon-buddy BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-pip %description -n python3-amazon-buddy # amazon_buddy ![python_version](https://img.shields.io/static/v1?label=Python&message=3.5%20|%203.6%20|%203.7&color=blue) [![PyPI downloads/month](https://img.shields.io/pypi/dm/amazon_buddy?logo=pypi&logoColor=white)](https://pypi.python.org/pypi/amazon_buddy) ## Description Amazon scraper. ## Install ~~~~bash pip install amazon_buddy # or pip3 install amazon_buddy ~~~~ ## Usage ~~~~python from amazon_buddy import Product, AmazonBuddy, Category, SortType ab = AmazonBuddy(debug=True, user_agent='ADD_USER_AGENT') # # products = ab.search_products( # # 'face wash', # # sort_type=SortType.PRICE_HIGH_TO_LOW, # # min_price=0, # # category=Category.BEAUTY_AND_PERSONAL_CARE, # # max_results=20 # # ) # # print(len(products)) asin = 'B07RZV9LB7' # # reviews = ab.get_reviews(asin=asin) # # print(reviews) ab.get_product_details(asin).save('{}.json'.format(asin)) # ab.get_product_details(asin).jsonprint() # Product.load('/Users/kristofk/github/py_amazon_buddy/B0758GYJK2.json').jsonprint() ~~~~ %package help Summary: Development documents and examples for amazon-buddy Provides: python3-amazon-buddy-doc %description help # amazon_buddy ![python_version](https://img.shields.io/static/v1?label=Python&message=3.5%20|%203.6%20|%203.7&color=blue) [![PyPI downloads/month](https://img.shields.io/pypi/dm/amazon_buddy?logo=pypi&logoColor=white)](https://pypi.python.org/pypi/amazon_buddy) ## Description Amazon scraper. ## Install ~~~~bash pip install amazon_buddy # or pip3 install amazon_buddy ~~~~ ## Usage ~~~~python from amazon_buddy import Product, AmazonBuddy, Category, SortType ab = AmazonBuddy(debug=True, user_agent='ADD_USER_AGENT') # # products = ab.search_products( # # 'face wash', # # sort_type=SortType.PRICE_HIGH_TO_LOW, # # min_price=0, # # category=Category.BEAUTY_AND_PERSONAL_CARE, # # max_results=20 # # ) # # print(len(products)) asin = 'B07RZV9LB7' # # reviews = ab.get_reviews(asin=asin) # # print(reviews) ab.get_product_details(asin).save('{}.json'.format(asin)) # ab.get_product_details(asin).jsonprint() # Product.load('/Users/kristofk/github/py_amazon_buddy/B0758GYJK2.json').jsonprint() ~~~~ %prep %autosetup -n amazon-buddy-2.0.29 %build %py3_build %install %py3_install install -d -m755 %{buildroot}/%{_pkgdocdir} if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi pushd %{buildroot} if [ -d usr/lib ]; then find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/lib64 ]; then find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/bin ]; then find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/sbin ]; then find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst fi touch doclist.lst if [ -d usr/share/man ]; then find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst fi popd mv %{buildroot}/filelist.lst . mv %{buildroot}/doclist.lst . %files -n python3-amazon-buddy -f filelist.lst %dir %{python3_sitelib}/* %files help -f doclist.lst %{_docdir}/* %changelog * Fri May 05 2023 Python_Bot - 2.0.29-1 - Package Spec generated