Client Usage#

Installation#

The easiest way to install the package:

pip install media-parser
pipx install media-parser
poetry add media-parser

Code examples#

 1from media_parser import Client, FeedbackTypes
 2
 3client = Client(url="http://localhost:8000")
 4
 5
 6async def main():
 7    # Get all media
 8    media = await client.parse("https://youtu.be/dQw4w9WgXcQ", user="jag-k")
 9    print(media)
10
11    # If media is incorrect, you can send feedback
12    await client.send_feedback(media, "jag-k", FeedbackTypes.wrong_media)
13
14
15if __name__ == '__main__':
16    import asyncio
17
18    asyncio.run(main())

For more info check media_parser.client.Client