post

Writing an AI X scraper and what it taught me about vanity

OR: Making fun of Linkedin headlines while explaining how the Grok image-generating part of my superhero script works. As I said on Linkedin, before my husband reminded me that I was “underselling myself:” -“I had a silly idea on Friday and made a Superhero card!”
Dabitch 8 min read
Writing an AI X scraper and what it taught me about vanity

What I did, more specifically, was write a small Python program that quietly checks the list of my - that is, @dabitch’s followers using X’s official tools, aka the API.

For each follower, it grabs their short bio and most recent tweets, turns that information into a creative description, and then prompts Grok to draw a superhero picture of that person based on the generated text. The “superhero card" and made-up superhero name get uploaded to the site superheros.sinless.org, like this;

I thought people might find their cards funny. I didn't quite expect the reactions that did happen.

One of the first people I showed the card to became very angry and unfollowed me in a huff. "Don't put my name on other websites!" he declared, as if his name and every word he wrote on X dot com couldn't be scraped by every robot casually passing by. He is under the impression that he is shadowbanned (he is not); he hates AI, and he tags me together with @BrianRoemmele every other day, despite Brian's account being obviously run completely by AI. But I digress.

I expected some reactions, just not that one. I did expect people might not be flattered, even though I tried to make the script as humorous, flattering, and friendly-roasting as possible. It is meant to roast you, but gently, in a funny, self-deprecating way. A mirror, but a fun one! Something that you can chuckle at and actually agree with. But Grok generates the image, and Grok is AI, and I can not take credit for that.

For some reason, I always end up with a statement necklace, when Grok rendered me I got another one that reads “IDEA". Generated by Gemini.

Now, here is how image generation works: AI image generators don’t “decide” what a grandmother looks like; they statistically reconstruct the most common visual patterns from training data. When a prompt like “grandmother” reliably produces an elderly woman with grey or white hair, wrinkles, and a soft sweater and hair in a bun, the model isn't expressing a personal opinion, enforcing a cultural agenda, or insulting anyone. It is pattern completion. Some people recognize patterns well, and some are better at it than others.

People who treat the output as a moral judgment are misunderstanding how these systems work. So if the image prompt states “middle-aged woman”, and the image generates what the common visual pattern of a middle-aged woman looks like, don't be insulted. Charlize Theron is an outlier. You look good for your age, honestly. Don't do a Paulina Porizkova and get insulted that I added "for your age" here, that is the expression. But fine, you look good. Moving on.

The model is a mirror of aggregated human photography and language, not a moral agent. Getting offended at the mirror for showing the average face is a category error. The useful response is to learn how the mirror works and to steer it with clearer language, not to demand that every statistical mode be sanded flat.

“How dare the AI assume grandmothers are old and grey-haired? That’s ageist/stereotypical/exclusionary.”

Well, no. Grandmothers are, by definition in most cultures, the mothers of parents. The biological and social timeline means the modal grandmother is older. Grey or white hair is a high-visibility signal of that age range in many populations. Training data therefore contains millions more images of older women labeled “grandmother” than images of younger women in the same role. The model is not inventing a stereotype; it is compressing the empirical distribution. In my head I can hear both my husband and my daughter yelling “Neeeeerd” at me right now, they do that when I get like this, it keeps me humble, but it doesn't stop me.

The model mirrors aggregated human photography and language, not a moral agent. Getting offended at the mirror for showing the average face is a category error. The useful response is to learn how the mirror works and to steer it with clearer language, not to demand that every statistical mode be sanded flat. I've used many different AI's to generate images in testing ideas. I tried out how Gemini would render me based on a Google image search on “Åsk Dabitch Wäppling”; the result was a redhead with a statement necklace talking about ads at some conference in Stockholm, and a cat in the corner. It looks nothing like me. Hilarious.


Now, Beleno describes herself as a mother in her bio, “Mum, wife & beyond” she mentions in passing. She also mentions being Spanish- and English-bilingual, so her image-generation prompt generated by my script states, “Bilingual mother.” What does a bilingual mother look like? A young woman with a toddler on her hip who only speaks Spanish, apparently.

When an image model is given the bare prompt “mother,” one of the strongest visual patterns in its training data is a woman holding or carrying a young child. Those compositions appear constantly in everyday photos, stock images, family portraits, and captioned internet pictures labeled “mother.” So the model’s statistical default leans that way. It doesn't need to put a toddler on the hip every time, but it is a very common outcome. The Spanish-English detail can add a mild secondary influence; in the training data, people labeled as Spanish-English bilingual are more frequently photographed with features common in Spanish-speaking populations (darker hair, olive or medium skin tones, etc.). So the model may tilt that way slightly, but it doesn't have to, and the result is still just a probabilistic guess, not a portrait of any real person. That Beleno’s daughter has graduated college and is an aspiring media professional with a portfolio online is neither here nor there to AI.

Training data contains millions more images of older women labeled “grandmother” than images of younger women in the same role. There are millions more “mother” images of moms with toddlers than images of mothers like Beleno or myself with our grown daughters. Search any stock image site and you'll see.

The model is not inventing a stereotype; it is compressing the empirical distribution. If the data contained equal numbers of 25-year-old and 75-year-old women labeled “grandmother,” the outputs would look different.

They do not, because reality (and the cameras pointed at it) do not. Treating the resulting image as an attack on diversity is like treating a weather model’s prediction of rain in a rainy climate as climate denial.

In the end I had to regenerate a few cards. The case of Alice was pretty interesting, because she kept being generated as mixed or or hispanic? Why? Well, the prompt always contained the word “Brixton.”

Image models learn statistical associations from the photos and captions in their training data. Brixton is a real London neighborhood with a well-documented history of Caribbean and African settlement from the Windrush generation onward and a substantial black population. Because public photographs, news images, street scenes, market shots, and cultural events tagged or captioned with “Brixton” disproportionately show black and mixed-heritage people, the model is more likely to draw from that denser training distribution when a prompt includes the bare keyword “Brixton,” especially for a person. That makes it more likely to depict someone with darker skin, Afro-textured or mixed hair, or other features common in those communities than a prompt that says “person in London.” In the end I had to edit this prompt manually to add “blonde woman.”

The script does not know that Alice's name is a English habitational surname, because I did not write a onomastic classifier into the script. A lot of people leave their real names out of their X bio these days, so a surname origin classifier looking names up in curated databases would be a colossal waste of time.

Most people had a good laugh at their cards, even if they were generated as actual gorillas, wolves, bunnies, cats, dogs, sturgeons, dragonflies, alligators and lord knows! Now granted, some of these animals were generated due to their usernames, but others popped up due what the users talked about a lot or simply how they described themselves.

Here's the actual lesson, the mirror that I wrote is working on your tweets and your bio. If the image and card generated is somehow offending you in the end, consider what you are putting in your bio and how other people are reading it.

People, much like the script, react to words in a similar way. We know this, no? After all, we work in advertising.


Now, some of my favorites generated by the script. They are very funny if you know the people behind the account, and funny even if you do not!


Share
Comments
More from Dabitch.net - Everything is so random there must be a pattern.

Dabitch.net - Everything is so random there must be a pattern.

Hi, I'm Åsk, I'm a geeky art director working in advertising and industrial design. Here I share whatever is on my mind and the occasional script.

Great! You’ve successfully signed up.

Welcome back! You've successfully signed in.

You've successfully subscribed to Dabitch.net - Everything is so random there must be a pattern. .

Success! Check your email for magic link to sign-in.

Success! Your billing info has been updated.

Your billing was not updated.