Skip to content

[BUG] AsyncYouTube has object has no attribute 'get_pot'Β #554

@The-Arx

Description

@The-Arx

πŸ›‘ DO NOT REMOVE OR SKIP THIS ISSUE TEMPLATE πŸ›‘

Issues with incomplete or missing information will be closed automatically.


🐞 Bug Description

Provide a clear and concise description of the bug.
get_pot is not defined on AsyncYouTube but it is called by call_innertube in get_vid_info
probably just needs a translation of the one in YouTube

πŸ”’ Code Snippet

Include the minimal code snippet that reproduces the issue.

# Insert your code here
url = f"https://www.youtube.com/watch?v={video_id}"
yt = AsyncYouTube(url)
streams = await yt.streams()

🎯 Expected Behavior

Describe what you expected to happen instead of the observed behavior.
I expected to get the streams

πŸ“Έ Screenshots or Logs

File "/home/user/fastapi_server.py", line 115, in read_youtube_video
streams = await yt.streams()
^^^^^^^^^^^^^^^^^^
File "/home/user/venv/lib/python3.12/site-packages/pytubefix/async_youtube.py", line 340, in streams
await self.check_availability()
File "/home/user/venv/lib/python3.12/site-packages/pytubefix/async_youtube.py", line 234, in check_availability
status, messages = extract.playability_status(await self.get_vid_info())
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/venv/lib/python3.12/site-packages/pytubefix/async_youtube.py", line 172, in get_vid_info
innertube_response = await call_innertube()
^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/venv/lib/python3.12/site-packages/pytubefix/async_youtube.py", line 164, in call_innertube
innertube.insert_po_token(visitor_data=await self.get_visitor_data(), po_token=await self.get_pot())
^^^^^^^^^^^^
AttributeError: 'AsyncYouTube' object has no attribute 'get_pot'

πŸ–₯️ Environment Details

Fill in the details below about your setup:

  • Operating System: Ubuntu 24.04.3 LTS
  • Python Version: 3.12.3
  • Pytubefix Version: 10.0.1

πŸ“‹ Additional Context

Add any additional information or context that might help us resolve the issue.


πŸš€ Next Steps

Once submitted, we will triage the issue. Make sure to respond to follow-up questions to keep the process smooth.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BUGSomething isn't working

    Projects

    Status

    waiting

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions