initial commit
This commit is contained in:
parent
13ee63c2b9
commit
6a7cf23e9d
5
.vscode/settings.json
vendored
Normal file
5
.vscode/settings.json
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"cSpell.words": [
|
||||
"sponsorblock"
|
||||
]
|
||||
}
|
6
development/playground.py
Normal file
6
development/playground.py
Normal file
@ -0,0 +1,6 @@
|
||||
from python_sponsorblock import SponsorBlock
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
sb = SponsorBlock()
|
||||
|
40
pyproject.toml
Normal file
40
pyproject.toml
Normal file
@ -0,0 +1,40 @@
|
||||
[build-system]
|
||||
requires = ["hatchling", "hatch-requirements-txt", "hatch-vcs"]
|
||||
build-backend = "hatchling.build"
|
||||
|
||||
[tool.hatch.build]
|
||||
directory = "dist"
|
||||
|
||||
[tool.hatch.build.targets.sdist]
|
||||
include = ["python_sponsorblock/*.py", "python_sponsorblock/**/*.py" ]
|
||||
|
||||
[tool.hatch.build.targets.wheel]
|
||||
packages = ["python_sponsorblock"]
|
||||
|
||||
[project.scripts]
|
||||
music-kraken = "python_sponsorblock.__main__:cli"
|
||||
|
||||
[tool.hatch.version]
|
||||
path = "python_sponsorblock/__about__.py"
|
||||
|
||||
[project]
|
||||
name = "python-sponsorblock"
|
||||
description = "This is a wrapper for the sponsorblock api, enabling you to get the timestamps of sponsor segments from youtube videos."
|
||||
authors = [{ name = "Hazel", email = "hazel_is_cute@proton.me" }]
|
||||
license = "MIT"
|
||||
readme = "README.md"
|
||||
repository = "https://gitea.elara.ws/music-kraken/python-sponsorblock"
|
||||
requires-python = ">=3.10"
|
||||
classifiers = [
|
||||
"Development Status :: 4 - Beta",
|
||||
"Intended Audience :: Developers",
|
||||
"License :: OSI Approved :: MIT License",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.10",
|
||||
]
|
||||
dependencies = [
|
||||
"requests~=2.31.0",
|
||||
]
|
||||
dynamic = [
|
||||
"version"
|
||||
]
|
1
python_sponsorblock/__about__.py
Normal file
1
python_sponsorblock/__about__.py
Normal file
@ -0,0 +1 @@
|
||||
__version__ = '0.0.0'
|
12
python_sponsorblock/__init__.py
Normal file
12
python_sponsorblock/__init__.py
Normal file
@ -0,0 +1,12 @@
|
||||
import requests
|
||||
|
||||
class SponsorBlockError(Exception):
|
||||
pass
|
||||
|
||||
|
||||
class SponsorBlock:
|
||||
def __init__(self, session: requests.Session = None, base_url: str = "https://sponsor.ajay.app"):
|
||||
self.base_url: str = base_url
|
||||
self.session: requests.Session = session or requests.Session()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user