summaryrefslogtreecommitdiff
path: root/python-gogo-scraper.spec
diff options
context:
space:
mode:
Diffstat (limited to 'python-gogo-scraper.spec')
-rw-r--r--python-gogo-scraper.spec210
1 files changed, 210 insertions, 0 deletions
diff --git a/python-gogo-scraper.spec b/python-gogo-scraper.spec
new file mode 100644
index 0000000..90382df
--- /dev/null
+++ b/python-gogo-scraper.spec
@@ -0,0 +1,210 @@
+%global _empty_manifest_terminate_build 0
+Name: python-gogo-scraper
+Version: 1.0.6
+Release: 1
+Summary: A simple web scraper to get information about anime from Gogoanime
+License: MIT
+URL: https://github.com/alanjoshua/gogo_scraper
+Source0: https://mirrors.nju.edu.cn/pypi/web/packages/6e/bb/a2909da571c427d89d0a10d9315eb3e6f5a1fe0191d87ecd370312749ad9/gogo_scraper-1.0.6.tar.gz
+BuildArch: noarch
+
+
+%description
+# gogo_scrapper
+A simple python goganime scraper
+
+## Installation
+<br />
+
+install gogo_scraper using `pip install gogo_scraper`
+
+<br />
+
+## Usage
+<br />
+<br />
+
+```import gogo_scraper as gogo # import module```
+<br />
+<br />
+<br />
+
+<p> Gets list of Gogoanime search results for the query "naruto" </p>
+
+```search = gogo.search("naruto")```
+<br />
+<br />
+<br />
+
+<p> Get link to naruto episode 10</p>
+<p> Here, "naruto" is the exact anime title/link in Gogoanime. Other anime might have complicated titles, so first use gogo.search() to get exact title</p>
+
+```link = gogo.getEpisode("naruto", 10)```
+
+<br />
+<br />
+<br />
+
+<p> Get latest episode from naruto </p>
+<p> Returns a dictionary {ep_num: 220, link: ...} </p>
+
+```latest_episode = gogo.getLatestEpisode("naruto")```
+
+<br />
+<br />
+<br />
+
+All these functions also take an optional `base_url` parameter, which could be used to scrap from a different Gogoanime server.
+
+Users could also directly change `gogo.BASE_URL` to globally change the server being used
+
+%package -n python3-gogo-scraper
+Summary: A simple web scraper to get information about anime from Gogoanime
+Provides: python-gogo-scraper
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-pip
+%description -n python3-gogo-scraper
+# gogo_scrapper
+A simple python goganime scraper
+
+## Installation
+<br />
+
+install gogo_scraper using `pip install gogo_scraper`
+
+<br />
+
+## Usage
+<br />
+<br />
+
+```import gogo_scraper as gogo # import module```
+<br />
+<br />
+<br />
+
+<p> Gets list of Gogoanime search results for the query "naruto" </p>
+
+```search = gogo.search("naruto")```
+<br />
+<br />
+<br />
+
+<p> Get link to naruto episode 10</p>
+<p> Here, "naruto" is the exact anime title/link in Gogoanime. Other anime might have complicated titles, so first use gogo.search() to get exact title</p>
+
+```link = gogo.getEpisode("naruto", 10)```
+
+<br />
+<br />
+<br />
+
+<p> Get latest episode from naruto </p>
+<p> Returns a dictionary {ep_num: 220, link: ...} </p>
+
+```latest_episode = gogo.getLatestEpisode("naruto")```
+
+<br />
+<br />
+<br />
+
+All these functions also take an optional `base_url` parameter, which could be used to scrap from a different Gogoanime server.
+
+Users could also directly change `gogo.BASE_URL` to globally change the server being used
+
+%package help
+Summary: Development documents and examples for gogo-scraper
+Provides: python3-gogo-scraper-doc
+%description help
+# gogo_scrapper
+A simple python goganime scraper
+
+## Installation
+<br />
+
+install gogo_scraper using `pip install gogo_scraper`
+
+<br />
+
+## Usage
+<br />
+<br />
+
+```import gogo_scraper as gogo # import module```
+<br />
+<br />
+<br />
+
+<p> Gets list of Gogoanime search results for the query "naruto" </p>
+
+```search = gogo.search("naruto")```
+<br />
+<br />
+<br />
+
+<p> Get link to naruto episode 10</p>
+<p> Here, "naruto" is the exact anime title/link in Gogoanime. Other anime might have complicated titles, so first use gogo.search() to get exact title</p>
+
+```link = gogo.getEpisode("naruto", 10)```
+
+<br />
+<br />
+<br />
+
+<p> Get latest episode from naruto </p>
+<p> Returns a dictionary {ep_num: 220, link: ...} </p>
+
+```latest_episode = gogo.getLatestEpisode("naruto")```
+
+<br />
+<br />
+<br />
+
+All these functions also take an optional `base_url` parameter, which could be used to scrap from a different Gogoanime server.
+
+Users could also directly change `gogo.BASE_URL` to globally change the server being used
+
+%prep
+%autosetup -n gogo-scraper-1.0.6
+
+%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-gogo-scraper -f filelist.lst
+%dir %{python3_sitelib}/*
+
+%files help -f doclist.lst
+%{_docdir}/*
+
+%changelog
+* Mon May 29 2023 Python_Bot <Python_Bot@openeuler.org> - 1.0.6-1
+- Package Spec generated