Skip to main content

bilibili AV/BV converter with avid>2^28 support

Project description

Bilibili-av-bv-converter

用户手册(中文版)

本转换器开源,可以自行把代码拿去研究


首先将avbv.py下载到python路径中的site-packages文件夹下 (我不会pypi,所以没有弄到pypi)

使用方法:导入avbv模块,就可以用av2bv和bv2av来进行互转了

示例代码:

from avbv import av2bv, bv2av
print(av2bv('av170001')) # BV17x411w7KC
print(bv2av('BV17x411w7KC')) # av170001

当在bv2av中输入不合法bv号(如bv1)会报错(IndexError)

但是下面的代码不会报错:

from avbv import bv2av
print(bv2av('DV17x411w7KC')) # av170001

如看不懂代码可以去看下面两个视频:

av转bv动画展示

bv转av动画展示

实际上我的就是通过这两个视频改的


Bilibili-av-bv-converter

User Manual (English version)

This converter is open-source, you can download the source and do some observation.

First, download the avbv.py, put it into python's site-packages folder. I don't know how to upload files to pypi

Then import it, you can use av2bv and bv2av to do convertions!

Sample:

from avbv import av2bv, bv2av
av2bv('av170001') # BV17x411w7KC
bv2av('BV17x411w7KC') # av170001

When you try to execute things such as bv2av("BV1"), it will generate an IndexError and exit.

But if you use that it will be working:

from avbv import bv2av
bv2av('DV17x411w7KC') # av170001

If you can't understand the code, you can watch these videos:

av to bv

bv to av

Of course, mine is modify by them

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

abv_py-0.1.0.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

abv_py-0.1.0-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

Details for the file abv_py-0.1.0.tar.gz.

File metadata

  • Download URL: abv_py-0.1.0.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for abv_py-0.1.0.tar.gz
Algorithm Hash digest
SHA256 4226af869a0c7c28d259441cd5aac830b0d4fd9900f3b13f518d9d83ed675e3f
MD5 519f03cb9a35d6766b6118ed39f8afe1
BLAKE2b-256 17314a074ea5de768d0d9cd06962824e5f06c2b58414a87cd9804920be81c65b

See more details on using hashes here.

File details

Details for the file abv_py-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: abv_py-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for abv_py-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0e4b93dea69cf0d1ee64f70173327b812da5175dca258e17a98324285cad1387
MD5 645ccbd1a96f3dc90ba59fcc1471025d
BLAKE2b-256 31f92db58a070cf5f85dd86743ca118f090d81bbf02ef752c8e611f49117a746

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page