Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

YouTube Video Download Failure due to Bot Detection #290

Open
Techops-AB opened this issue Oct 18, 2024 · 1 comment
Open

YouTube Video Download Failure due to Bot Detection #290

Techops-AB opened this issue Oct 18, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@Techops-AB
Copy link


Describe the bug
The script encounters an error message "VXHa83Lcmdk This request was detected as a bot. Use use_po_token=True to view. See more details at #209" when attempting to download a YouTube video.


code that was used that resulted in the bug

from pytubefix import YouTube
import uuid, os, tempfile


youtubeObject = YouTube(link)#,use_po_token=True) ## Asking for token input on terminal
youtubeObject = youtubeObject.streams.get_highest_resolution()
uniqueFilename = str(uuid.uuid4()) + ".mp4"
with tempfile.TemporaryDirectory() as tempDir:
    tempFilePath = os.path.join(tempDir, uniqueFilename)
    youtubeObject.download(output_path=tempDir, filename=uniqueFilename)
print("Youtube download is completed successfully")

Expected behavior
The script should download a video from the provided YouTube video URL and save it with a unique filename in the temporary directory.


Version Details :

  • The script is deployed as an endpoint using FastAPI and hosted on Google Cloud Platform (GCP) App Engine.
  • Python version: 3.9
  • pytubefix version: 8.1.1
@Techops-AB Techops-AB added the bug Something isn't working label Oct 18, 2024
@JuanBindez
Copy link
Owner

This is not a bug, did you look at #209?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: waiting
Development

No branches or pull requests

2 participants