Skip to content

Build4Build/DigitalInfluencer

Repository files navigation

Virtual Influencer YouTube Bot 🤖

This project is a fully automated, easily re-themable virtual influencer that fetches the latest news in a specific niche, generates a narrated video, and uploads it to YouTube.

Features

  • Fetches real news using NewsAPI (free tier)
  • Summarizes news using OpenAI GPT (optional, free tier)
  • Generates video using gTTS (free) and moviepy (free)
  • Uploads to YouTube (requires free OAuth setup)
  • Easily change the niche/topic in .env

Setup

1. Clone the repo and install dependencies

pip install -r requirements.txt

2. Create a .env file with the following variables:

NEWS_API_KEY=your_newsapi_key
YOUTUBE_API_KEY=your_youtube_api_key  # (not used, but reserved)
VIDEO_GEN_API_KEY=your_video_gen_api_key  # (not used, but reserved)
GOOGLE_APPLICATION_CREDENTIALS=client_secret.json  # Path to your YouTube OAuth credentials
YOUTUBE_CHANNEL_ID=your_channel_id
NARRATOR_VOICE=default
NICHE="Australian immigration news"
VIDEO_TITLE="Australian Immigration News"
KEYWORDS="Australia immigration,Australia permanent visa,Australia visa 190,Australia visa 186,Department of Home Affairs Visa Processing Time,Australia skilled migration,Australia PR changes,Australia migration update"
POST_SCHEDULE="0 9 * * 1,4"
OPENAI_API_KEY=your_openai_api_key  # Optional, for better summarization

3. Update your freshly created .env

4. Run the bot

python main.py # or python3 main.py
  • The script will fetch news, generate a summary, create a video, and upload (or simulate upload) to YouTube.
  • The output video will be output_video.mp4.

Changing the Niche/Theme

  • Edit the NICHE variable in .env to any topic (e.g., "crypto news", "AI breakthroughs", etc.).
  • Update the VIDEO_TITLE to match your niche (e.g., "Crypto Daily Updates", "AI News Weekly").
  • Customize the KEYWORDS with comma-separated search terms relevant to your niche (e.g., "Bitcoin,Ethereum,cryptocurrency,crypto market,blockchain").
  • The bot will fetch and summarize news for the new topic automatically.

Scheduling (Optional)

  • Use crontab or a Python scheduler to run the bot twice a week as desired.

Who Created This Digital Influencer Electron App?

Pierre-Henry Soria. A super passionate engineer who loves automating content creation efficiently!

Enthusiast of YouTube, AI, learning, and researching! Find me at pH7.me

Enjoying this project? Buy me a coffee (spoiler: I love almond extra-hot flat white coffees).

Pierre-Henry Soria

@phenrysay YouTube Tech Videos pH-7 BlueSky


Enjoy your automated virtual influencer!