Compare commits
9 Commits
v1.0.0-bet
...
master
Author | SHA1 | Date |
---|---|---|
|
78a14c9f2c | |
|
a58c71bb25 | |
|
524170d97a | |
|
e87f804f98 | |
|
ab951a4fb6 | |
|
dc61c70222 | |
|
e1734185c9 | |
|
8f27cf672e | |
|
63f08c7ec7 |
|
@ -24,10 +24,6 @@ jobs:
|
|||
python -m pip install --upgrade pip
|
||||
python -m pip install pytest
|
||||
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
|
||||
|
||||
#- name: Test with pyTest
|
||||
# run: |
|
||||
# python -m pytest -v
|
||||
|
||||
- name: Build package
|
||||
run: |
|
||||
|
|
30
README.md
30
README.md
|
@ -1,13 +1,11 @@
|
|||
# Piped API client (Python)
|
||||
|
||||
[![Test with pyTest](https://github.com/CWKevo/python-piped-api-client/actions/workflows/pytest.yml/badge.svg?branch=master)](https://github.com/CWKevo/python-piped-api-client/actions/workflows/pytest.yml)
|
||||
|
||||
A Python API wrapper for [Piped](https://piped-docs.kavin.rocks/). This can essentially be used as an alternative way to access YouTube's API, without needing to use an API key.
|
||||
A Python API wrapper for [Piped](https://piped-docs.kavin.rocks/). This can essentially be used as an alternative way to access YouTube's API, without needing to use an API key. Forked to allow for search queries to be made.
|
||||
|
||||
## Installation
|
||||
|
||||
```bash
|
||||
pip install piped-api
|
||||
pip install git+https://gitdab.com/cere/python-piped-api-client
|
||||
```
|
||||
|
||||
## Quickstart
|
||||
|
@ -46,26 +44,4 @@ It is not meant to be a replacement for the official YouTube API, but it can hel
|
|||
|
||||
## Useful links
|
||||
|
||||
- [Piped's official API documentation](https://piped-docs.kavin.rocks/docs/api-documentation/)
|
||||
- [Documentation for this package](https://cwkevo.github.io/python-piped-api-client/)
|
||||
|
||||
## 🎁 Support me
|
||||
|
||||
I create free software to benefit people.
|
||||
If this project helps you and you like it, consider supporting me by donating via cryptocurrency:
|
||||
|
||||
| Crypto | Address |
|
||||
| ----------------- | ------------------------------------------------------------------------------------------------- |
|
||||
| Bitcoin | [E-mail me](mailto:me@kevo.link) |
|
||||
| Ethereum | `0x12C598b3bC084710507c9d6d19C9434fD26864Cc` |
|
||||
| Litecoin | `LgHQK1NQrRQ56AKvVtSxMubqbjSWh7DTD2` |
|
||||
| Dash | `Xe7TYoRCYPdZyiQYDjgzCGxR5juPWV8PgZ` |
|
||||
| Zcash: | `t1Pesobv3SShMHGfrZWe926nsnBo2pyqN3f` |
|
||||
| Dogecoin: | `DALxrKSbcCXz619QqLj9qKXFnTp8u2cS12` |
|
||||
| Ripple: | `rNQsgQvMbbBAd957XyDeNudA4jLH1ANERL` |
|
||||
| Monero: | `48TfTddnpgnKBn13MdJNJwHfxDwwGngPgL3v6bNSTwGaXveeaUWzJcMUVrbWUyDSyPDwEJVoup2gmDuskkcFuNG99zatYFS` |
|
||||
| Bitcoin Cash: | `qzx6pqzcltm7ely24wnhpzp65r8ltrqgeuevtrsj9n` |
|
||||
| Ethereum Classic: | `0x383Dc3B83afBD66b4a5e64511525FbFeb2C023Db` |
|
||||
|
||||
More cryptocurrencies are supported. If you are interested in donating with a different one, please [E-mail me](mailto:me@kevo.link).
|
||||
No other forms of donation are currently supported.
|
||||
- [Piped's official API documentation](https://piped-docs.kavin.rocks/docs/api-documentation/)
|
|
@ -155,3 +155,16 @@ class PipedClient:
|
|||
kwargs.update({'params': {'query': search_query}})
|
||||
|
||||
return self._get_json(f"/suggestions", **kwargs)
|
||||
|
||||
def get_search_results(self, search_query: str, filter: str="all", **kwargs) -> t.List[str]:
|
||||
"""
|
||||
Obtains search results for a query.
|
||||
|
||||
### Parameters:
|
||||
- `search_query` - The query to get search results for
|
||||
- `**kwargs` - Additional keyword arguments to pass to `requests.Session.get`
|
||||
"""
|
||||
|
||||
kwargs.update({'params': {'q': search_query, 'filter': filter}})
|
||||
|
||||
return self._get_json(f"/search", **kwargs)
|
5
setup.py
5
setup.py
|
@ -11,7 +11,7 @@ __author__ = "SKevo"
|
|||
__copyright__ = "Copyright (c) 2021, SKevo"
|
||||
__credits__ = ["SKevo"]
|
||||
__license__ = "MIT"
|
||||
__version__ = "v1.0.0-beta"
|
||||
__version__ = "v1.0.1-beta"
|
||||
__maintainer__ = "SKevo"
|
||||
__email__ = "me@kevo.link"
|
||||
__status__ = "4 - Beta"
|
||||
|
@ -32,7 +32,7 @@ __doc__ = __readme__
|
|||
|
||||
setuptools.setup(
|
||||
name = 'piped-api',
|
||||
packages = setuptools.find_packages(exclude=('tests',), include=('piped_api',)),
|
||||
packages = setuptools.find_packages(exclude=('tests',)),
|
||||
|
||||
long_description=__readme__,
|
||||
long_description_content_type='text/markdown',
|
||||
|
@ -57,5 +57,6 @@ setuptools.setup(
|
|||
'Programming Language :: Python :: 3.7',
|
||||
'Programming Language :: Python :: 3.8',
|
||||
'Programming Language :: Python :: 3.9',
|
||||
'Programming Language :: Python :: 3.10',
|
||||
],
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue