Back to projects

2013

Fandom scraper and Corrie faces

I wanted structured data about Coronation Street and Fandom does not have DBpedia. Infoboxes are still in there, so I wrote a Python scraper, then later pointed a Haar cascade at a clip to see if it could tell Emma from Steve.

Video

I had a few hours on a train and was bored of example datasets that did not interest me. Wikipedia is usually where I go for data, via DBpedia, but Wikipedia has rules about what is worthy of notice. I wondered where you would find the stuff that is not. Fandom is a pile of wikis for people who care a lot about obscure things.

Infoboxes still have structure, but there is no SPARQL, and the API tools I tried did not play nicely. I wrote a fairly dirty Python script: take a category, walk the subcategories, pull the top of each page, save the infobox as JSON. Default target was Coronation Street characters. You can point it at another fandom by changing a variable. I said in the blog post I would not maintain it, because scraping is a pain. The repo still gets stars.

Around the same time I pointed a face detector at a Corrie clip, just to see. The 2013 posts are the same habit earlier: text-mining Coronation Street in R, then mapping telenovela casts. Fandom was what I reached for once Wikipedia’s structured layer was not enough.

The mashup

Soap-opera wikis, infoboxes, a Python crawl, and a face detector pointed at Coronation Street.

AI-generated guess of the mashup mix, 1 to 5. Click a stat.

Fandom 5/5: Infoboxes have structure, but there is no SPARQL endpoint.

Explore Further

Notes to self for media to add
  • Hero: a Corrie infobox next to a JSON blob, or a still from the face clip with boxes around faces. Not a stock ‘AI vision’ image.
  • Screenshots: fandom character page infobox; the JSON output; the Python FANDOM_SITE constant. Optional: the 2013 R post.
  • The YouTube test clip is already on the page.
  • YouTube Short: crop the Corrie clip with the caption ‘is it Emma or is it Steve’.
  • Copyright: Corrie stills are other people’s. Keep the clip as a small test, not a gallery of characters.