image_link()

fetching the image link of a Vtuber Fandom page

Vwiki().image_link(vtuber: str, auto_correct: bool = False)

#or

AioVwiki().image_link(vtuber: str, auto_correct: bool = False)
Parameters
  • vtuber (str) - the vtuber's fandom page to search for

  • auto_correct (bool) - whether or not the vtuber query will get auto-corrected (default: False)

Note: it is recommended to turn off auto_correct for specific query search

Returns

str - an image url of the vtuber's profile picture

Note: image_link value will be "None" if there is no vtuber's image link of the page

Use Case

Without auto_correct :

from vtuberwiki import AioVwiki
import asyncio

async def get_image():
    async with AioVwiki() as aio_vwiki:
        s = await aio_vwiki.image_link(vtuber="mythia batford",auto_correct=False)
        print(s) # No wiki results for Vtuber "mythia batford"
        
        # Correct one is "Mythia_Batford"

asyncio.run(get_image()

With auto_correct :

from vtuberwiki import AioVwiki
import asyncio

async def get_image():
    async with AioVwiki() as aio_vwiki:
        s = await aio_vwiki.image_link(vtuber="mythia batford",auto_correct=True)
        print(s) # https://static.wikia.nocookie.net/virtualyoutuber/images/3/3a/Mythia_Batford_2.0.jpg/revision/latest/scale-to-width-down/350?cb=20211212184926
        
        # it gets auto-corrected to "Mythia_Batford"

asyncio.run(get_image()

Last updated