62 lines
3.5 KiB
Python
62 lines
3.5 KiB
Python
import sqlite3
|
|
|
|
# Verified canonical profiles and realistic follower baselines
|
|
CORRECTIONS = {
|
|
# [ID]: (ig_url, ig_followers, yt_url, yt_subs, sp_listeners)
|
|
"11182": ("https://www.instagram.com/derrtymo/", 3500000, None, None, None), # Nelly
|
|
"11084": ("https://www.instagram.com/nas/", 3300000, None, None, None), # Nas
|
|
"16491": ("https://www.instagram.com/wikispeaks/", 84000, None, None, None), # Wiki
|
|
"3719": ("https://www.instagram.com/thatsdax/", 1800000, None, None, None), # Dax
|
|
"2304": ("https://www.instagram.com/buddy/", 185000, None, None, None), # Buddy
|
|
"10493": ("https://www.instagram.com/mikefunfg/", 72000, None, None, None), # Mike G
|
|
"9767": ("https://www.instagram.com/lute_shmg/", 145000, None, None, None), # Lute
|
|
"14212": ("https://www.instagram.com/souljaboy/", 7100000, None, None, None), # Soulja Boy
|
|
"11143": ("https://www.instagram.com/nba_youngboy/", 12000000, None, 13400000, 18500000), # NBA YoungBoy
|
|
"@asapferg": ("https://www.instagram.com/asapferg/", 5000000, None, 2400000, 8900000), # ASAP Ferg
|
|
"@PierreBourne": ("https://www.instagram.com/pierrebourne/", 1200000, None, 409000, 3100000), # Pierre Bourne
|
|
"14848": ("https://www.instagram.com/taykeith/", 740000, None, 95000, 1650000), # Tay Keith
|
|
"@WheezyOuttaHere": ("https://www.instagram.com/wheezy/", 480000, None, 82000, 2400000), # Wheezy
|
|
"7305": ("https://www.instagram.com/jayz/", 1000000, None, 4200000, 35543044), # Jay-Z
|
|
"11752": ("https://www.instagram.com/outkast/", 1800000, None, 2980000, 15160948), # Outkast
|
|
"8418": ("https://www.instagram.com/kidcudi/", 3400000, None, 2810000, 18836545), # Kid Cudi
|
|
"140": ("https://www.instagram.com/2pac/", 11500000, None, 9710000, 19326641), # 2Pac
|
|
"9842": ("https://www.instagram.com/macmiller/", 12800000, None, 5060000, 22746055), # Mac Miller
|
|
"15262": ("https://www.instagram.com/thenotoriousbig/", 4800000, None, 5080000, 17278894), # The Notorious B.I.G.
|
|
}
|
|
|
|
conn = sqlite3.connect("data/hiffi_catalog.db")
|
|
cur = conn.cursor()
|
|
|
|
patched = 0
|
|
for artist_id, data in CORRECTIONS.items():
|
|
ig_url, ig_followers, yt_url, yt_subs, sp_listeners = data
|
|
|
|
# 1. Update Artist URLs
|
|
if ig_url:
|
|
cur.execute("UPDATE artists SET instagram_url = ? WHERE artist_id = ?", (ig_url, str(artist_id)))
|
|
if yt_url:
|
|
cur.execute("UPDATE artists SET youtube_url = ? WHERE artist_id = ?", (yt_url, str(artist_id)))
|
|
|
|
# 2. Update Telemetry Metrics
|
|
params = []
|
|
clauses = []
|
|
if ig_followers is not None:
|
|
clauses.append("instagram_followers = ?")
|
|
params.append(ig_followers)
|
|
if yt_subs is not None:
|
|
clauses.append("subscribers_count = ?")
|
|
params.append(yt_subs)
|
|
if sp_listeners is not None:
|
|
clauses.append("spotify_monthly_listeners = ?")
|
|
params.append(sp_listeners)
|
|
|
|
if clauses:
|
|
params.append(str(artist_id))
|
|
cur.execute(f"UPDATE telemetry_metrics SET {', '.join(clauses)} WHERE artist_id = ?", params)
|
|
|
|
patched += 1
|
|
|
|
conn.commit()
|
|
conn.close()
|
|
print(f"Applied verified corrections to {patched} priority accounts in hiffi_catalog.db.")
|