summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-05-05 15:17:38 +0000
committerCoprDistGit <infra@openeuler.org>2023-05-05 15:17:38 +0000
commita8d95dcd2e6ecda5259b216118cb7c8b4b35a3c1 (patch)
tree96bfc0537c98feab126f73b48e2634ea1ef51b7d
parentf21e3dae8b40e507cf47488f18f393d404a64576 (diff)
automatic import of python-app-store-scraperopeneuler20.03
-rw-r--r--.gitignore1
-rw-r--r--python-app-store-scraper.spec481
-rw-r--r--sources1
3 files changed, 483 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..8a087a2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/app-store-scraper-0.3.5.tar.gz
diff --git a/python-app-store-scraper.spec b/python-app-store-scraper.spec
new file mode 100644
index 0000000..96f97dc
--- /dev/null
+++ b/python-app-store-scraper.spec
@@ -0,0 +1,481 @@
+%global _empty_manifest_terminate_build 0
+Name: python-app-store-scraper
+Version: 0.3.5
+Release: 1
+Summary: Single API ☝ App Store Review Scraper 🧹
+License: MIT
+URL: https://github.com/cowboy-bebug/app-store-scraper
+Source0: https://mirrors.nju.edu.cn/pypi/web/packages/ca/be/c72a0a7b26c384f9b7126a1dea7987aeefd19673fe8476d93fdd8ec83755/app-store-scraper-0.3.5.tar.gz
+BuildArch: noarch
+
+Requires: python3-requests
+
+%description
+![build](https://img.shields.io/github/workflow/status/cowboy-bebug/app-store-scraper/Build)
+[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/cowboy-bebug/app-store-scraper/pulls)
+[![PyPI](https://img.shields.io/pypi/v/app-store-scraper)](https://pypi.org/project/app-store-scraper/)
+![downloads](https://img.shields.io/pypi/dm/app-store-scraper)
+![license](https://img.shields.io/pypi/l/app-store-scraper)
+![code style](https://img.shields.io/badge/code%20style-black-black)
+
+```
+ ___ _____ _ _____
+ / _ \ / ___| | / ___|
+ / /_\ \_ __ _ __ \ `--.| |_ ___ _ __ ___ \ `--. ___ _ __ __ _ _ __ ___ _ __
+ | _ | '_ \| '_ \ `--. \ __/ _ \| '__/ _ \ `--. \/ __| '__/ _` | '_ \ / _ \ '__|
+ | | | | |_) | |_) | /\__/ / || (_) | | | __/ /\__/ / (__| | | (_| | |_) | __/ |
+ \_| |_/ .__/| .__/ \____/ \__\___/|_| \___| \____/ \___|_| \__,_| .__/ \___|_|
+ | | | | | |
+ |_| |_| |_|
+```
+
+# Quickstart
+
+Install:
+```console
+pip3 install app-store-scraper
+```
+
+Scrape reviews for an app:
+```python
+from app_store_scraper import AppStore
+from pprint import pprint
+
+minecraft = AppStore(country="nz", app_name="minecraft")
+minecraft.review(how_many=20)
+
+pprint(minecraft.reviews)
+pprint(minecraft.reviews_count)
+```
+
+Scrape reviews for a podcast:
+```python
+from app_store_scraper import Podcast
+from pprint import pprint
+
+sysk = Podcast(country="nz", app_name="stuff you should know")
+sysk.review(how_many=20)
+
+pprint(sysk.reviews)
+pprint(sysk.reviews_count)
+```
+
+# Extra Details
+
+Let's continue from the code example used in [Quickstart](#quickstart).
+
+
+## Instantiation
+
+There are two required and one positional parameters:
+
+- `country` (required)
+ - two-letter country code of [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) standard
+- `app_name` (required)
+ - name of an iOS application to fetch reviews for
+ - also used by `search_id()` method to search for `app_id` internally
+- `app_id` (positional)
+ - can be passed directly
+ - or ignored to be obtained by `search_id` method internally
+
+Once instantiated, the object can be examined:
+```pycon
+>>> minecraft
+AppStore(country='nz', app_name='minecraft', app_id=479516143)
+```
+```pycon
+>>> print(app)
+ Country | nz
+ Name | minecraft
+ ID | 479516143
+ URL | https://apps.apple.com/nz/app/minecraft/id479516143
+Review count | 0
+```
+
+Other optional parameters are:
+
+- `log_format`
+ - passed directly to `logging.basicConfig(format=log_format)`
+ - default is `"%(asctime)s [%(levelname)s] %(name)s - %(message)s"`
+- `log_level`
+ - passed directly to `logging.basicConfig(level=log_level)`
+ - default is `"INFO"`
+- `log_interval`
+ - log is produced every 5 seconds (by default) as a "heartbeat" (useful for a long scraping session)
+ - default is `5`
+
+
+## Fetching Review
+
+The maximum number of reviews fetched per request is 20. To minimise the number of calls, the limit of 20 is hardcoded. This means the `review()` method will always grab more than the `how_many` argument supplied with an increment of 20.
+
+```pycon
+>>> minecraft.review(how_many=33)
+>>> minecraft.reviews_count
+40
+```
+
+If `how_many` is not provided, `review()` will terminate after *all* reviews are fetched.
+
+**NOTE** the review count seen on the landing page differs from the actual number of reviews fetched. This is simply because only *some* users who rated the app also leave reviews.
+
+### Optional Parameters
+
+- `after`
+ - a `datetime` object to filter older reviews
+- `sleep`
+ - an `int` to specify seconds to sleep between each call
+
+## Review Data
+
+The fetched review data are loaded in memory and live inside `reviews` attribute as a list of dict.
+```pycon
+>>> minecraft.reviews
+[{'userName': 'someone', 'rating': 5, 'date': datetime.datetime(...
+```
+
+Each review dictionary has the following schema:
+```python
+{
+ "date": datetime.datetime,
+ "isEdited": bool,
+ "rating": int,
+ "review": str,
+ "title": str,
+ "userName": str
+ }
+```
+
+
+
+
+%package -n python3-app-store-scraper
+Summary: Single API ☝ App Store Review Scraper 🧹
+Provides: python-app-store-scraper
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-pip
+%description -n python3-app-store-scraper
+![build](https://img.shields.io/github/workflow/status/cowboy-bebug/app-store-scraper/Build)
+[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/cowboy-bebug/app-store-scraper/pulls)
+[![PyPI](https://img.shields.io/pypi/v/app-store-scraper)](https://pypi.org/project/app-store-scraper/)
+![downloads](https://img.shields.io/pypi/dm/app-store-scraper)
+![license](https://img.shields.io/pypi/l/app-store-scraper)
+![code style](https://img.shields.io/badge/code%20style-black-black)
+
+```
+ ___ _____ _ _____
+ / _ \ / ___| | / ___|
+ / /_\ \_ __ _ __ \ `--.| |_ ___ _ __ ___ \ `--. ___ _ __ __ _ _ __ ___ _ __
+ | _ | '_ \| '_ \ `--. \ __/ _ \| '__/ _ \ `--. \/ __| '__/ _` | '_ \ / _ \ '__|
+ | | | | |_) | |_) | /\__/ / || (_) | | | __/ /\__/ / (__| | | (_| | |_) | __/ |
+ \_| |_/ .__/| .__/ \____/ \__\___/|_| \___| \____/ \___|_| \__,_| .__/ \___|_|
+ | | | | | |
+ |_| |_| |_|
+```
+
+# Quickstart
+
+Install:
+```console
+pip3 install app-store-scraper
+```
+
+Scrape reviews for an app:
+```python
+from app_store_scraper import AppStore
+from pprint import pprint
+
+minecraft = AppStore(country="nz", app_name="minecraft")
+minecraft.review(how_many=20)
+
+pprint(minecraft.reviews)
+pprint(minecraft.reviews_count)
+```
+
+Scrape reviews for a podcast:
+```python
+from app_store_scraper import Podcast
+from pprint import pprint
+
+sysk = Podcast(country="nz", app_name="stuff you should know")
+sysk.review(how_many=20)
+
+pprint(sysk.reviews)
+pprint(sysk.reviews_count)
+```
+
+# Extra Details
+
+Let's continue from the code example used in [Quickstart](#quickstart).
+
+
+## Instantiation
+
+There are two required and one positional parameters:
+
+- `country` (required)
+ - two-letter country code of [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) standard
+- `app_name` (required)
+ - name of an iOS application to fetch reviews for
+ - also used by `search_id()` method to search for `app_id` internally
+- `app_id` (positional)
+ - can be passed directly
+ - or ignored to be obtained by `search_id` method internally
+
+Once instantiated, the object can be examined:
+```pycon
+>>> minecraft
+AppStore(country='nz', app_name='minecraft', app_id=479516143)
+```
+```pycon
+>>> print(app)
+ Country | nz
+ Name | minecraft
+ ID | 479516143
+ URL | https://apps.apple.com/nz/app/minecraft/id479516143
+Review count | 0
+```
+
+Other optional parameters are:
+
+- `log_format`
+ - passed directly to `logging.basicConfig(format=log_format)`
+ - default is `"%(asctime)s [%(levelname)s] %(name)s - %(message)s"`
+- `log_level`
+ - passed directly to `logging.basicConfig(level=log_level)`
+ - default is `"INFO"`
+- `log_interval`
+ - log is produced every 5 seconds (by default) as a "heartbeat" (useful for a long scraping session)
+ - default is `5`
+
+
+## Fetching Review
+
+The maximum number of reviews fetched per request is 20. To minimise the number of calls, the limit of 20 is hardcoded. This means the `review()` method will always grab more than the `how_many` argument supplied with an increment of 20.
+
+```pycon
+>>> minecraft.review(how_many=33)
+>>> minecraft.reviews_count
+40
+```
+
+If `how_many` is not provided, `review()` will terminate after *all* reviews are fetched.
+
+**NOTE** the review count seen on the landing page differs from the actual number of reviews fetched. This is simply because only *some* users who rated the app also leave reviews.
+
+### Optional Parameters
+
+- `after`
+ - a `datetime` object to filter older reviews
+- `sleep`
+ - an `int` to specify seconds to sleep between each call
+
+## Review Data
+
+The fetched review data are loaded in memory and live inside `reviews` attribute as a list of dict.
+```pycon
+>>> minecraft.reviews
+[{'userName': 'someone', 'rating': 5, 'date': datetime.datetime(...
+```
+
+Each review dictionary has the following schema:
+```python
+{
+ "date": datetime.datetime,
+ "isEdited": bool,
+ "rating": int,
+ "review": str,
+ "title": str,
+ "userName": str
+ }
+```
+
+
+
+
+%package help
+Summary: Development documents and examples for app-store-scraper
+Provides: python3-app-store-scraper-doc
+%description help
+![build](https://img.shields.io/github/workflow/status/cowboy-bebug/app-store-scraper/Build)
+[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/cowboy-bebug/app-store-scraper/pulls)
+[![PyPI](https://img.shields.io/pypi/v/app-store-scraper)](https://pypi.org/project/app-store-scraper/)
+![downloads](https://img.shields.io/pypi/dm/app-store-scraper)
+![license](https://img.shields.io/pypi/l/app-store-scraper)
+![code style](https://img.shields.io/badge/code%20style-black-black)
+
+```
+ ___ _____ _ _____
+ / _ \ / ___| | / ___|
+ / /_\ \_ __ _ __ \ `--.| |_ ___ _ __ ___ \ `--. ___ _ __ __ _ _ __ ___ _ __
+ | _ | '_ \| '_ \ `--. \ __/ _ \| '__/ _ \ `--. \/ __| '__/ _` | '_ \ / _ \ '__|
+ | | | | |_) | |_) | /\__/ / || (_) | | | __/ /\__/ / (__| | | (_| | |_) | __/ |
+ \_| |_/ .__/| .__/ \____/ \__\___/|_| \___| \____/ \___|_| \__,_| .__/ \___|_|
+ | | | | | |
+ |_| |_| |_|
+```
+
+# Quickstart
+
+Install:
+```console
+pip3 install app-store-scraper
+```
+
+Scrape reviews for an app:
+```python
+from app_store_scraper import AppStore
+from pprint import pprint
+
+minecraft = AppStore(country="nz", app_name="minecraft")
+minecraft.review(how_many=20)
+
+pprint(minecraft.reviews)
+pprint(minecraft.reviews_count)
+```
+
+Scrape reviews for a podcast:
+```python
+from app_store_scraper import Podcast
+from pprint import pprint
+
+sysk = Podcast(country="nz", app_name="stuff you should know")
+sysk.review(how_many=20)
+
+pprint(sysk.reviews)
+pprint(sysk.reviews_count)
+```
+
+# Extra Details
+
+Let's continue from the code example used in [Quickstart](#quickstart).
+
+
+## Instantiation
+
+There are two required and one positional parameters:
+
+- `country` (required)
+ - two-letter country code of [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) standard
+- `app_name` (required)
+ - name of an iOS application to fetch reviews for
+ - also used by `search_id()` method to search for `app_id` internally
+- `app_id` (positional)
+ - can be passed directly
+ - or ignored to be obtained by `search_id` method internally
+
+Once instantiated, the object can be examined:
+```pycon
+>>> minecraft
+AppStore(country='nz', app_name='minecraft', app_id=479516143)
+```
+```pycon
+>>> print(app)
+ Country | nz
+ Name | minecraft
+ ID | 479516143
+ URL | https://apps.apple.com/nz/app/minecraft/id479516143
+Review count | 0
+```
+
+Other optional parameters are:
+
+- `log_format`
+ - passed directly to `logging.basicConfig(format=log_format)`
+ - default is `"%(asctime)s [%(levelname)s] %(name)s - %(message)s"`
+- `log_level`
+ - passed directly to `logging.basicConfig(level=log_level)`
+ - default is `"INFO"`
+- `log_interval`
+ - log is produced every 5 seconds (by default) as a "heartbeat" (useful for a long scraping session)
+ - default is `5`
+
+
+## Fetching Review
+
+The maximum number of reviews fetched per request is 20. To minimise the number of calls, the limit of 20 is hardcoded. This means the `review()` method will always grab more than the `how_many` argument supplied with an increment of 20.
+
+```pycon
+>>> minecraft.review(how_many=33)
+>>> minecraft.reviews_count
+40
+```
+
+If `how_many` is not provided, `review()` will terminate after *all* reviews are fetched.
+
+**NOTE** the review count seen on the landing page differs from the actual number of reviews fetched. This is simply because only *some* users who rated the app also leave reviews.
+
+### Optional Parameters
+
+- `after`
+ - a `datetime` object to filter older reviews
+- `sleep`
+ - an `int` to specify seconds to sleep between each call
+
+## Review Data
+
+The fetched review data are loaded in memory and live inside `reviews` attribute as a list of dict.
+```pycon
+>>> minecraft.reviews
+[{'userName': 'someone', 'rating': 5, 'date': datetime.datetime(...
+```
+
+Each review dictionary has the following schema:
+```python
+{
+ "date": datetime.datetime,
+ "isEdited": bool,
+ "rating": int,
+ "review": str,
+ "title": str,
+ "userName": str
+ }
+```
+
+
+
+
+%prep
+%autosetup -n app-store-scraper-0.3.5
+
+%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-app-store-scraper -f filelist.lst
+%dir %{python3_sitelib}/*
+
+%files help -f doclist.lst
+%{_docdir}/*
+
+%changelog
+* Fri May 05 2023 Python_Bot <Python_Bot@openeuler.org> - 0.3.5-1
+- Package Spec generated
diff --git a/sources b/sources
new file mode 100644
index 0000000..8a2790a
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+1057370ac2da0986fc35d0774c30e646 app-store-scraper-0.3.5.tar.gz