From 95d9b42ff689c2a9801e6865848a730224ac8b47 Mon Sep 17 00:00:00 2001 From: CoprDistGit Date: Fri, 5 May 2023 03:42:37 +0000 Subject: automatic import of python-amazon-buddy --- python-amazon-buddy.spec | 205 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 205 insertions(+) create mode 100644 python-amazon-buddy.spec (limited to 'python-amazon-buddy.spec') diff --git a/python-amazon-buddy.spec b/python-amazon-buddy.spec new file mode 100644 index 0000000..d1f5351 --- /dev/null +++ b/python-amazon-buddy.spec @@ -0,0 +1,205 @@ +%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 -- cgit v1.2.3