<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Emre ULUTAŞ</title>
    <description>The latest articles on DEV Community by Emre ULUTAŞ (@emre_uluta_d5e6bd869741f).</description>
    <link>https://dev.to/emre_uluta_d5e6bd869741f</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4253619%2F45e477fa-027c-408b-b0ba-e9bf6d278aaf.png</url>
      <title>DEV Community: Emre ULUTAŞ</title>
      <link>https://dev.to/emre_uluta_d5e6bd869741f</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/emre_uluta_d5e6bd869741f"/>
    <language>en</language>
    <item>
      <title>How I Built a Bot That Fact-Checks Finance YouTube Videos (Python + Supadata)</title>
      <dc:creator>Emre ULUTAŞ</dc:creator>
      <pubDate>Thu, 19 Nov 2026 10:42:24 +0000</pubDate>
      <link>https://dev.to/emre_uluta_d5e6bd869741f/how-i-built-a-bot-that-fact-checks-finance-youtube-videos-python-supadata-2hm1</link>
      <guid>https://dev.to/emre_uluta_d5e6bd869741f/how-i-built-a-bot-that-fact-checks-finance-youtube-videos-python-supadata-2hm1</guid>
      <description>&lt;p&gt;Disclosure: I earn Supadata credits for writing this post. Everything below is from a bot I actually run every day.&lt;/p&gt;

&lt;p&gt;I follow a handful of finance YouTube channels, some in Turkish and some in English. Every day they publish videos full of claims like "Nvidia has to break $166 before you buy" or "Nasdaq support is 26,700–27,200". I don't have time to watch them all, and I definitely don't have time to check whether those claims hold up against real market data.&lt;/p&gt;

&lt;p&gt;So I built a bot that does it for me. Three times a day it:&lt;/p&gt;

&lt;p&gt;Finds the new videos from my channels in the last 24 hours&lt;br&gt;
Pulls the full transcript with the Supadata YouTube Transcript API&lt;br&gt;
Extracts every concrete claim (ticker, direction, price level, timeframe)&lt;br&gt;
Tests each claim against real price data&lt;br&gt;
Labels it true / partly true / false / unverifiable, scores it 1–5, and writes a report&lt;br&gt;
In this tutorial I'll show you the core of it: turning a YouTube link into text with Supadata, and checking a simple price claim against market data. You can copy the code and run it in a few minutes.&lt;/p&gt;

&lt;p&gt;Why Supadata?&lt;br&gt;
The hard part of this whole project is getting reliable text out of a YouTube video. Scraping YouTube captions yourself breaks constantly, and many videos only have auto-generated captions in Turkish. Supadata gives me one HTTP endpoint: I send a video URL and a language, and I get the transcript back as plain text. It works for both my Turkish and English channels with the same code.&lt;/p&gt;

&lt;p&gt;Step 1: Get an API key&lt;br&gt;
Sign up at Supadata, open the dashboard, and copy your API key. The free plan gives you 100 credits a month, which is plenty to test with. Store the key as an environment variable so it never ends up in your code:&lt;/p&gt;

&lt;p&gt;export SUPADATA_KEY="your-key-here"&lt;br&gt;
Step 2: Fetch a transcript&lt;br&gt;
This is the function my bot uses (simplified). It only needs the Python standard library:&lt;/p&gt;

&lt;p&gt;import json, os, urllib.parse, urllib.request, urllib.error&lt;br&gt;
def get_transcript(video_url: str, lang: str = "en") -&amp;gt; str:&lt;br&gt;
    key = os.environ["SUPADATA_KEY"]&lt;br&gt;
    params = urllib.parse.urlencode({&lt;br&gt;
        "url": video_url,&lt;br&gt;
        "lang": lang,       # "tr" for my Turkish channels&lt;br&gt;
        "mode": "native",   # use the video's existing captions&lt;br&gt;
        "text": "true",     # return plain text instead of timed segments&lt;br&gt;
    })&lt;br&gt;
    req = urllib.request.Request(&lt;br&gt;
        f"&lt;a href="https://api.supadata.ai/v1/transcript?%7Bparams%7D" rel="noopener noreferrer"&gt;https://api.supadata.ai/v1/transcript?{params}&lt;/a&gt;",&lt;br&gt;
        headers={"x-api-key": key},&lt;br&gt;
    )&lt;br&gt;
    try:&lt;br&gt;
        data = json.loads(urllib.request.urlopen(req, timeout=120).read())&lt;br&gt;
    except urllib.error.HTTPError as e:&lt;br&gt;
        raise RuntimeError(f"Supadata error {e.code}: {e.read()[:200]!r}")&lt;br&gt;
    content = data.get("content")&lt;br&gt;
    if isinstance(content, list):  # timed segments&lt;br&gt;
        content = " ".join(seg.get("text", "") for seg in content)&lt;br&gt;
    if not content:&lt;br&gt;
        raise RuntimeError("Empty transcript")&lt;br&gt;
    return content&lt;br&gt;
if &lt;strong&gt;name&lt;/strong&gt; == "&lt;strong&gt;main&lt;/strong&gt;":&lt;br&gt;
    text = get_transcript("&lt;a href="https://www.youtube.com/watch?v=VIDEO_ID" rel="noopener noreferrer"&gt;https://www.youtube.com/watch?v=VIDEO_ID&lt;/a&gt;", lang="en")&lt;br&gt;
    print(len(text.split()), "words")&lt;br&gt;
    print(text[:500])&lt;br&gt;
Run it with any finance video URL and you'll see the first 500 characters of the transcript. Two things I learned the hard way:&lt;/p&gt;

&lt;p&gt;Cache everything. Each transcript costs a credit, so my bot saves every transcript to transcripts/YYYY-MM-DD/.txt and never fetches the same video twice.&lt;br&gt;
Track your usage. You can check your remaining credits with GET &lt;a href="https://api.supadata.ai/v1/me" rel="noopener noreferrer"&gt;https://api.supadata.ai/v1/me&lt;/a&gt;. My bot warns me when I pass 80% of my monthly credits.&lt;/p&gt;

&lt;p&gt;def credits_left() -&amp;gt; int:&lt;br&gt;
    req = urllib.request.Request(&lt;br&gt;
        "&lt;a href="https://api.supadata.ai/v1/me" rel="noopener noreferrer"&gt;https://api.supadata.ai/v1/me&lt;/a&gt;",&lt;br&gt;
        headers={"x-api-key": os.environ["SUPADATA_KEY"]},&lt;br&gt;
    )&lt;br&gt;
    me = json.loads(urllib.request.urlopen(req, timeout=30).read())&lt;br&gt;
    return me["maxCredits"] - me["usedCredits"]&lt;br&gt;
Step 3: Find the claims&lt;br&gt;
Once I have the text, an AI agent reads the transcript and pulls out structured claims. Each claim becomes a small record:&lt;/p&gt;

&lt;p&gt;claim = {&lt;br&gt;
    "ticker": "NVDA",&lt;br&gt;
    "type": "level",          # level, direction, or event&lt;br&gt;
    "level": 166.0,&lt;br&gt;
    "direction": "above",     # the speaker says: don't buy until it closes above 166&lt;br&gt;
    "speaker": "Channel host",&lt;br&gt;
    "video": "&lt;a href="https://www.youtube.com/watch?v=VIDEO_ID" rel="noopener noreferrer"&gt;https://www.youtube.com/watch?v=VIDEO_ID&lt;/a&gt;",&lt;br&gt;
}&lt;br&gt;
You can use any LLM for this step. The key is to ask for a strict format (JSON) and only accept claims that name a specific asset and something measurable. Vague opinions ("the market feels scary") are kept in the report but marked as unverifiable.&lt;/p&gt;

&lt;p&gt;Step 4: Test a claim against real data&lt;br&gt;
For level claims, the test is simple: did the price actually close above or below the level the speaker named? Here's a minimal checker. get_last_close is whatever market data source you use (I use a paid market data API; any daily close works):&lt;/p&gt;

&lt;p&gt;def check_level_claim(claim: dict, last_close: float) -&amp;gt; dict:&lt;br&gt;
    level, direction = claim["level"], claim["direction"]&lt;br&gt;
    if direction == "above":&lt;br&gt;
        held = last_close &amp;gt; level&lt;br&gt;
    elif direction == "below":&lt;br&gt;
        held = last_close &amp;lt; level&lt;br&gt;
    else:&lt;br&gt;
        return {**claim, "verdict": "unverifiable"}&lt;br&gt;
    distance = (last_close - level) / level * 100&lt;br&gt;
    return {&lt;br&gt;
        **claim,&lt;br&gt;
        "last_close": last_close,&lt;br&gt;
        "distance_pct": round(distance, 2),&lt;br&gt;
        "verdict": "condition met" if held else "condition not met yet",&lt;br&gt;
    }&lt;br&gt;
print(check_level_claim(claim, last_close=151.88))&lt;/p&gt;

&lt;h1&gt;
  
  
  {'ticker': 'NVDA', ..., 'distance_pct': -8.51, 'verdict': 'condition not met yet'}
&lt;/h1&gt;

&lt;p&gt;In the real bot I also look at intraday highs and lows, RSI, and moving averages, because a price can poke through a level during the day and still close back inside. I treat a level as broken only on a daily close.&lt;/p&gt;

&lt;p&gt;Step 5: Score and report&lt;br&gt;
Each claim gets two scores from 1 to 5: how much it matters (impact) and how well it's backed by data (reliability). A claim that relies on a single unconfirmed news story never gets more than 4. The bot writes everything to a Markdown report with the video title, channel, speaker, publish time, link, and the rough minute in the video where the claim appears. Then it saves a copy to Google Drive.&lt;/p&gt;

&lt;p&gt;What I'd tell you if you build this&lt;br&gt;
Start with one channel and one claim type (price levels). It's surprisingly useful on its own.&lt;br&gt;
Separate "the news exists" from "the event happened". A lot of YouTube claims are just repeating a headline.&lt;br&gt;
Supadata is the piece that turns a YouTube link into something a program can work with. Everything else is just checking numbers.&lt;br&gt;
If you want to try it, you can get a key here: supadata.ai. Happy building!&lt;br&gt;
&lt;a href="https://supadata.ai/r/GG9B7P6N" rel="noopener noreferrer"&gt;https://supadata.ai/r/GG9B7P6N&lt;/a&gt;&lt;/p&gt;

</description>
      <category>python</category>
      <category>api</category>
      <category>youtube</category>
      <category>ai</category>
    </item>
  </channel>
</rss>
