pyxk
Project description
Pyxk
pyxk install
$ python -m pip install pyxk
pyxk.aclient
from pprint import pprint
from pyxk import Client, Response
class Downloader(Client):
start_urls = ['https://pypi.org' for _ in range(2)]
async def parse(self, response: Response, **kwargs):
title = await response.xpath('//title/text()')
return title.get()
async def completed(self, result: list):
pprint(result)
if __name__ == '__main__':
Downloader.run()
>> ['PyPI · The Python Package Index', 'PyPI · The Python Package Index']
pyxk.m3u8
from pyxk.m3u8 import load_url, load_content
url = 'http://xxx.m3u8'
output = 'xxx/xxx'
load_url(url=url, output=output)
$ m3u8 --help
Usage: m3u8 [OPTIONS] COMMAND [ARGS]...
m3u8下载器
Options:
-o, --output TEXT M3U8存储路径
--reload 重载m3u8资源
--reserve 保留m3u8资源
-h, --headers <TEXT TEXT>... Request Headers
--no-verify Request Verify
-l, --limit INTEGER 下载并发量
-ua, --user-agent TEXT User-Agent
--help Show this message and exit.
Commands:
file 使用m3u8文件下载资源
url 使用m3u8链接下载资源
# use m3u8 download
$ m3u8 file xxx/xxx.m3u8 -o xxx/xxx.mp4
$ m3u8 url https://xxx.m3u8 -o xxx/xxx.mp4
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pyxk-0.6.9.tar.gz
(30.5 kB
view hashes)
Built Distribution
pyxk-0.6.9-py3-none-any.whl
(34.7 kB
view hashes)