Dataset Viewer
Auto-converted to Parquet
episode_title
stringclasses
3 values
season
stringclasses
1 value
episode_number
stringclasses
3 values
script_text
stringclasses
3 values
The National Anthem
season_1
s01e01
'Don't kill me. 'Please don't kill me. ' 'Read the statement. 'Yes. 'On this screen? 'That is correct. 'Duchess of Beaumont. 'Popularly known as Princess Susannah. 'I am in a place you er 'cannot find, held by one you will not trace. 'Prime Minister Michael Callow 'Prime Minister Michael Callow my life '. 'If you do not do precisely as instructed by 'by 4pm this afternoon, I will be '. 'Please. ' What are you doing? Keep it going. 'There is only one demand, and it is a simple one. 'At 4pm this afternoon, 'Prime Minister Michael Callow must appear on live British television 'on all networks, terrestrial and satellite, 'and No! 'On all British networks, terrestrial and satellite, 'and have full unsimulated sexual intercourse with a pig. 'I don't understand!' The video ends with a series of technical specifications for the broadcast. ' No way. 'It's gone global, Tom. ' Don't. 'Look, I'm sorry. ' You know how much help you're getting hereon in? Shove it up your arse you fucking Interesting. ' Mr Callett. "Fruition to be transmitted in full"? Focus on the visuals. 'It's been confirmed that Susannah, Duchess of Beaumont 'appears to depict the princess pleading for her life. 'The video contains a bizarre ransom demand of a personal nature 'involving the Prime Minister, and a detailed list of instructions 'relating to the enactment of this demand. 'As police round up potential suspects' '. 'A man thought to be connected with a religious pressure group, dragged to a waiting van' If it's terrorists, they'll take her head off. '. ' 'The kidnap video has been watched by over 18 million people. 'While we wait for Downing Street to respond, 'the nation is voicing its opinion. 'I don't think anyone should concede to any humiliation under threat. 'I couldn't bear to watch that. 'I won't be tuning in. '. 'People will look at him like he's insane and take his position away. 'Nothing too abnormal for MPs. 'They're all sexual deviants, all MPs and Prime Ministers. ' We've been squeezing hard, but nothing concrete. "Her"? It's the Queen herself. 'As the 4pm deadline draws nearer, the world holds its breath' Would they use a female pig? It's on the list. 'I can't think of anything remotely like this. 'A new form of terrorism 'That's the point! Make love to a pig!' Make love? Steer them away from the grisly details. 'Let's not dwell on any of the details. 'This is already a huge national talking point. 'Isn't this precisely what whoever is behind this is looking for?' How's Her Majesty taking it? "I trust you'll do everything in your power to get her back. " And we are. 16am. 'Target identified. ' Commissioner. 'With the 4pm deadline three hours away, 'time is running out for the Prime Minister' They got in, Do you think I'd be here if they had? Listen, coverage is very sympathetic. 'With hours to go, time is running out for the security services. 'Joining us is actress Lydia' Thought this was coming from IB7. 'UKN News has passed all material to Scotland Yard' Fucking hell! God! I can't watch this! He's got to do what they want. 'A few hours ago, public opinion was behind Prime Minister Callow, 'he should fulfil the bizarre and illegal request. 'In the wake of these images, 'and the delivery of the princess's finger, the mood is shifting. 'It'll be humiliating, but nothing compared to her suffering. 'He's just got to do it. 'What's the alternative? 'We can get another Prime Minister. 'If he doesn't get her released, he's finished, isn't he? 'Online polls suggest that 86% of voters 'now believe the demand should be met. 'Damon Brown' When are Walker's team hitting the college? They need time No more pissing around. 'Malaika, make sure they can't' Stay down! Don't move! Run, Malaika! Run! Get out of there. 'Let's take you live 'as we see the Prime Minister's car travelling across London' He's got to do it. '. ' We've ratified the law - after midnight, it'll be a criminal offence to store any recording or images of the event. '. 'As the 4pm deadline approaches, the nation is at a standstill 'watching the extraordinary situation play out. 'Just to remind you, this is now a story of global significance' "Michael Callow has displayed incredible bravery "in what was a matter of life or death. " That's how it opens, then we should move on OK. '. ' 'This is an official announcement. 'The Prime Minister will perform an indecent act on your screens. '. 'Recording or possessing a copy of this broadcast will become illegal. 'All viewers are advised to turn off their televisions immediately. 'The broadcast will commence after the following tone. ' . ' 'I 'I love my wife. ' 'May God forgive me. ' No! Jesus! Poor bastard! But it's been on for nearly an hour. 'On the one-year anniversary of his humiliating ordeal, 'an apparently unconcerned Michael Callow put in an assured performance 'at a public appearance, accompanied by his wife Jane. 'OK. 'The other central figure in events was also before the camera 'at last night's Children Of Valour Awards. 'Princess Susannah made her first public appearance 'since announcing her pregnancy. 'It was one year ago that the Turner Prize-winning artist, 'Carlton Bloom, 'coerced the Prime Minister into committing an indecent act. 'As the anniversary arrived, one art critic caused controversy 'by describing it as "the first great artwork of the 21st century". 'While cultural commentators debate its significance, 'with a global audience of 1. 3 billion, 'it was an event in which we all participated. 'The incident failed to destroy a Prime Minister, 'who holds an approval rating three points higher than last year. 'Damon Brown, UKN. ' Jane.
15 Million Merits
season_1
s01e02
'New from Wraith Babes, the hottest girls in nasty situations. ' 'Let's play Botherguts!' 'Come on! 'Three, two, one! 'Go! 'Chuck her a bun! 'Not hungry?! That's a first?! 'Come on! 'That'd hurt! Brilliant! Fucking brilliant, that! That one does that sometimes. 'Licking my pussy. ' For Christ's sake! Way to mood-kill, blubbernaut! Cheers for the reflection! One minute I'm in slitsville, the next there's a haunted pig gawping at me. ' 'Howie Mandelbrot. ' 'Each headlines their own content on one of your eight daylight streams. 'But they started here, like you. 'Putting their back into giving back for a brighter now. 'Each paying their dues like you, hoping to become a hot shot. ' 'That wasn't good '. 'New from Wraith Babes, the hottest girls in the nastiest situations. 'So let's view it. ' 'Resume viewing. 'Resume viewing. 'Resume viewing. 'Resume viewing. ' 'You are going to see it all. ' 'Exclusively on Wraith Babes XL. 'Hey, what else were you planning to do with that hand?' 'You lick my pussy, baby. 'I turn you on! 'Hi, I'm Roxy, hello. 'Hi, I'm Evie. ' Didn't let him sign in. 'Best thing about my new lifestyle? Where do I start? 'I love choosing my own clothes and I love gold. 'I feel like it really expresses who I really am 'and I love looking over outside. 'It's so beautiful sometimes, I just wish that everyone could see it. ' Nice outfit Suits you. 'Well, honesty is ruthless so I suppose it's just honesty 'ruthless honesty. ' Drying my hands. 'Select view ' Dick. - You'll take your fingers off. - Trust me. - It's all just stuff. " Which proves acceptable. 'The hottest girls in the nastiest situations. ' Yeah! Can't believe I'm doing this. - What? - Preview. - He's with me. - Hand? Show me your hand. - Stand aside. - It's not fair! It's not fair! - Next lot. - Stand there. - Okay and what are you? - Singer. - Cuppliance? - No, thanks. - She's got to perform. - Well Look, just sip it, you'll be fine. - Really? - Yeah, I'm fine. - And who're we looking at here? - Abi Khan. 'I get to live 'in a 'beautiful place. 'And 'wear lots of 'beautiful things. 'It's a dream. ' Insufficient funds. 'From Wraith Babes ' 'C'mon, girl ' '. ' I guess I'd like to be as big as Thelma one day. 'Millions watched her glide through the Hot Shot curtain of dreams 'to sing her heart out. ' 'What happened next shocked them all. ' We could really work with you. 'You were at Hot Shot. 'You were real impressive. ' Resume viewing! - No! No! - Resume viewing! Resume viewing! Resume viewing! Resume viewing! Resume viewing! Resume viewing! Resume viewing! Resume viewing! 'Look at you. 'All clean and shiny. ' Portal disabled during commercial. 'You'll see everything. 'You'll see it all! 'Open your mouth. 'Open take it in 'take it in yeah No! No! No! No! 'The hottest girls ' Could you stand aside, please? Come up into the back, in front of me, please. ' A sort of performance? Yes. - Speak! - Speak! Speak! Speak! Speak! Let's hear what he has to say. - I like your stuff. - It's not stuff. - Do it, do it, do it! - Do it, do it, do it! Beats the bike. 'We have with us Oliver. ' OK, I'm going to stop you there. 'Yeah. '15,000 new wardrobe options 'launched last week alone. 'It effectively translates as 15,000 new ways to kill time 'in your cell before you explore an afterlife 'which doesn't exist anyway. 'With any luck, it'll take your mind off those saddle sores? 'You know the only thing stopping me from slashing myself open right now? 'I might not die right away. 'And before I went, they'd find a way 'to charge my twitching half-dead cadaver, '20,000 merits for swabbing the walls clean. ' - Yeah. - Anyway, 'hang on in there if you must. 'We're all in this together they say. 'Yeah, right. 'Farewell for ever. 'Till the same time next week. ' Stream off-line.
The Entire History of You
season_1
s01e03
'You can get a willow grain upgrade for less than the price 'of a daily cup of coffee, and three decades of backup for free. 'In-store ingrain procedure with local anaesthetic 'and you're good to go. 'Because memory is for living. ' VOICES AT HIGH SPEED OK, great, this has been really great, Liam, we really hope to look forward to seeing you again. (Lucy, Dublin. ) Hello. - Great to see you again. - Yeah, you too. (LAUGHS) We didn't know well, she didn't know if you would make it. - Hello. - How's Jody? - At home, Gina's babysitting. - You all right? - Good, thank you. - And you know Jeff? - Yes. - Hello. - Hello. - You all right for a drink? - I'm fine, thank you, Jonas. (LAUGHS) And Jeff. - Hard to gauge? - Yeah Let's have a look. - Come on. - Um It could be fun, we could, um vote! - Paul? - Yeah? I work in recruitment, so it might be quite useful for you. - Notes. - Pointers, you know. - I think Liam would probably - Yes, do you know what Guys, no, come on, seriously, that's not cool, I mean Liam's obviously uncomfortable, so let's just drop it, yeah? Have a cool time. - You OK? - Yeah, yeah. - You know, if you're not in the mood, we can go. - No, no, I'm fine. - Hi. - Hi. " The problem is the more that you pay and the longer it goes on, the more you're, "Oh, yeah, we loved it!", you know, "We love being together and never fucking anyone else" "and only just having one other person" "to share our real thoughts with for our entire lives, yeah, it's great!" Would you say you loved her, though? I just think we just really fancied each other and that was what it was. (THEY CHUCKLE) Yeah, no brain damage, clearly! Well, my sight held on fine, so So, who took it then? Stolen to order, as far as they could tell, probably to some millionaire Chinese perve. (ALL) Yay! Stuff from last night, depressing and fun. ' He looks forward to seeing you again, that's good. "Hopes" to look forward. ' It's phoney. - It's a tick! - Or the start of the swastika. " Then why invite him over? I like him. 'Wow, it's only, it's early to call it a night. ' 'Do fancy a quick one down the pub?' 'Oh, we've got to get back, 'rescue Jodie from the paedophile babysitter! '(LAUGHS)' 'Yeah. ' 'But why don't you come back to ours, for a nightcap if you want?' See? It was obvious I didn't want him to come, I was being polite to a moron. (LAUGHS) Yeah, time does that. 15 minutes. 'Bye-bye. 'OK. 'Love you, love you. ' Was he a big part of the gang? Who? Jonas? I don't know, yeah? Let me guess, he'd spent his time oozing round the girls, offering backrubs. 'I went away and had a little thing that did my head in for a while 'with this, sort of '. ' 'Mr Marrakech?' '(LAUGHS) Yeah. ' 'I'm imagining a chillum and a big knob. ' '(LAUGHS) No, it was like dormouse. ' 'Big deal, big heart-breaker?' 'No, it was just a week. 'It was a weird week. ' So, a weird week or a month? The point is, it wasn't a big deal. 'You're a bitch!' I'd like you to erase that. 'You're a bitch!' Also, "sometimes". - I love you, you know? - I know. 'I've got a beautiful woman upstairs waiting to have sex with me. 'And I'd find myself, you know, watching redos of hot times 'in earlier relationships. ' 'Easy!' 'Lip read reconstruction enabled. - 'Hey, it's good to see you. - 'Good to see you, too. 'I was nervous when I heard you were going to be here. 'It's weird, isn't it?' - Morning. - Gina, over here. - You do. " That was fucking embarrassing. - Spot the difference. - You're drunk. 'Easy. ' Sober up. 'Green warning. 'Grain assistant suggests you may not be in a suitable 'physical condition for the activity you appear to be engaged in. 'To override, continue at your own risk. 'All health and personal accident insurance is ' Thank you. 'Liam. 'Sorry, Liam, mate, is there something that you want?' Yeah, I just want to come in and talk to you. - Hey. - Hey. - No, I'm all right. - He's uptight, isn't he? - OK, Liam. - It's a lovely room, this. - Thank you. - Come on, mate. - All right, now, what are you doing? Don't do that. 'Tell you what ' Stop it! I tell you what you're going to do. 'I don't have a brain chip to show you. ' This is a bottle, right? Either you wipe it or I will fucking gouge you myself. 'I'm doing it. ' Liam? Where did you go? What happened? Liam, what happened? Did you use a condom or not? Just say. - You sure about that? - Yes! That's nice. 'I'll tell you what you're going to do. 'You're going to get every bit of Fion ' ' Christ, what have you done? 'Select it all ' We're getting to the good bit. 'Hello, police, I'm witnessing a serious assault at ' 'Now, delete it all. ' 18 months ago in this room. - And you saw him put it on? - Yes. - Did you? - Yeah. - Show it to me. - No. - Show it to me! - No! Show it to me! I want to see! I want to see what he looks like! This isn't me! Look what you're doing to me! Fi, I need to see it! Please. 'Sorry!' GROANS FROM SCREEN GROANS AND GIGGLING CONTINUE HEAVY BREATHING FROM SCREEN MOANING FROM SCREEN MUSIC BEGINS TO PLAY I love you.

"Black Mirror Scripts Scrapping with Jina"


import requests
import os
import time
import re
import logging
from datasets import Dataset, DatasetDict
from urllib.parse import urljoin

# Set up logging
logging.basicConfig(
    level=logging.INFO,
    format='%(asctime)s - %(levelname)s - %(message)s',
    handlers=[
        logging.FileHandler('scrape_black_mirror.log'),
        logging.StreamHandler()
    ]
)
logger = logging.getLogger(__name__)

# Define the episode structure for all seasons
episodes = {
    "season_1": [
        {"title": "The National Anthem", "url": "https://www.springfieldspringfield.co.uk/view_episode_scripts.php?tv-show=black-mirror-2011&episode=s01e01", "episode_number": "s01e01"},
        {"title": "15 Million Merits", "url": "https://www.springfieldspringfield.co.uk/view_episode_scripts.php?tv-show=black-mirror-2011&episode=s01e02", "episode_number": "s01e02"},
        {"title": "The Entire History of You", "url": "https://www.springfieldspringfield.co.uk/view_episode_scripts.php?tv-show=black-mirror-2011&episode=s01e03", "episode_number": "s01e03"},
    ],
    "season_2": [
        {"title": "Be Right Back", "url": "https://www.springfieldspringfield.co.uk/view_episode_scripts.php?tv-show=black-mirror-2011&episode=s02e01", "episode_number": "s02e01"},
        {"title": "White Bear", "url": "https://www.springfieldspringfield.co.uk/view_episode_scripts.php?tv-show=black-mirror-2011&episode=s02e02", "episode_number": "s02e02"},
        {"title": "The Waldo Moment", "url": "https://www.springfieldspringfield.co.uk/view_episode_scripts.php?tv-show=black-mirror-2011&episode=s02e03", "episode_number": "s02e03"},
        {"title": "Christmas Special", "url": "https://www.springfieldspringfield.co.uk/view_episode_scripts.php?tv-show=black-mirror-2011&episode=s02e90", "episode_number": "s02e90"},
    ],
    "season_3": [
        {"title": "Nosedive", "url": "https://www.springfieldspringfield.co.uk/view_episode_scripts.php?tv-show=black-mirror-2011&episode=s03e01", "episode_number": "s03e01"},
        {"title": "Playtest", "url": "https://www.springfieldspringfield.co.uk/view_episode_scripts.php?tv-show=black-mirror-2011&episode=s03e02", "episode_number": "s03e02"},
        {"title": "Shut Up and Dance", "url": "https://www.springfieldspringfield.co.uk/view_episode_scripts.php?tv-show=black-mirror-2011&episode=s03e03", "episode_number": "s03e03"},
        {"title": "San Junipero", "url": "https://www.springfieldspringfield.co.uk/view_episode_scripts.php?tv-show=black-mirror-2011&episode=s03e04", "episode_number": "s03e04"},
        {"title": "Men Against Fire", "url": "https://www.springfieldspringfield.co.uk/view_episode_scripts.php?tv-show=black-mirror-2011&episode=s03e05", "episode_number": "s03e05"},
        {"title": "Hated in the Nation", "url": "https://www.springfieldspringfield.co.uk/view_episode_scripts.php?tv-show=black-mirror-2011&episode=s03e06", "episode_number": "s03e06"},
    ],
    "season_4": [
        {"title": "USS Callister", "url": "https://www.springfieldspringfield.co.uk/view_episode_scripts.php?tv-show=black-mirror-2011&episode=s04e01", "episode_number": "s04e01"},
        {"title": "ArkAngel", "url": "https://www.springfieldspringfield.co.uk/view_episode_scripts.php?tv-show=black-mirror-2011&episode=s04e02", "episode_number": "s04e02"},
        {"title": "Crocodile", "url": "https://www.springfieldspringfield.co.uk/view_episode_scripts.php?tv-show=black-mirror-2011&episode=s04e03", "episode_number": "s04e03"},
        {"title": "Hang the DJ", "url": "https://www.springfieldspringfield.co.uk/view_episode_scripts.php?tv-show=black-mirror-2011&episode=s04e04", "episode_number": "s04e04"},
        {"title": "Metalhead", "url": "https://www.springfieldspringfield.co.uk/view_episode_scripts.php?tv-show=black-mirror-2011&episode=s04e05", "episode_number": "s04e05"},
        {"title": "Black Museum", "url": "https://www.springfieldspringfield.co.uk/view_episode_scripts.php?tv-show=black-mirror-2011&episode=s04e06", "episode_number": "s04e06"},
    ],
    "season_5": [
        {"title": "Striking Vipers", "url": "https://www.springfieldspringfield.co.uk/view_episode_scripts.php?tv-show=black-mirror-2011&episode=s05e01", "episode_number": "s05e01"},
        {"title": "Smithereens", "url": "https://www.springfieldspringfield.co.uk/view_episode_scripts.php?tv-show=black-mirror-2011&episode=s05e02", "episode_number": "s05e02"},
        {"title": "Rachel, Jack and Ashley Too", "url": "https://www.springfieldspringfield.co.uk/view_episode_scripts.php?tv-show=black-mirror-2011&episode=s05e03", "episode_number": "s05e03"},
    ],
    "season_6": [
        {"title": "Joan Is Awful", "url": "https://www.springfieldspringfield.co.uk/view_episode_scripts.php?tv-show=black-mirror-2011&episode=s06e01", "episode_number": "s06e01"},
        {"title": "Loch Henry", "url": "https://www.springfieldspringfield.co.uk/view_episode_scripts.php?tv-show=black-mirror-2011&episode=s06e02", "episode_number": "s06e02"},
        {"title": "Beyond the Sea", "url": "https://www.springfieldspringfield.co.uk/view_episode_scripts.php?tv-show=black-mirror-2011&episode=s06e03", "episode_number": "s06e03"},
        {"title": "Mazey Day", "url": "https://www.springfieldspringfield.co.uk/view_episode_scripts.php?tv-show=black-mirror-2011&episode=s06e04", "episode_number": "s06e04"},
        {"title": "Demon 79", "url": "https://www.springfieldspringfield.co.uk/view_episode_scripts.php?tv-show=black-mirror-2011&episode=s06e05", "episode_number": "s06e05"},
    ],
    "season_7": [
        {"title": "Common People", "url": "https://www.springfieldspringfield.co.uk/view_episode_scripts.php?tv-show=black-mirror-2011&episode=s07e01", "episode_number": "s07e01"},
        {"title": "Bête Noire", "url": "https://www.springfieldspringfield.co.uk/view_episode_scripts.php?tv-show=black-mirror-2011&episode=s07e02", "episode_number": "s07e02"},
        {"title": "Hotel Reverie", "url": "https://www.springfieldspringfield.co.uk/view_episode_scripts.php?tv-show=black-mirror-2011&episode=s07e03", "episode_number": "s07e03"},
        {"title": "Plaything", "url": "https://www.springfieldspringfield.co.uk/view_episode_scripts.php?tv-show=black-mirror-2011&episode=s07e04", "episode_number": "s07e04"},
        {"title": "Eulogy", "url": "https://www.springfieldspringfield.co.uk/view_episode_scripts.php?tv-show=black-mirror-2011&episode=s07e05", "episode_number": "s07e05"},
        {"title": "USS Callister: Into Infinity", "url": "https://www.springfieldspringfield.co.uk/view_episode_scripts.php?tv-show=black-mirror-2011&episode=s07e06", "episode_number": "s07e06"},
    ],
}

# Jina AI Reader API prefix
JINA_READER_PREFIX = "https://r.jina.ai/"

# Function to clean script text
def clean_script_text(text):
    logger.info("Cleaning script text")
    # Remove excessive newlines and whitespace
    text = re.sub(r'\n\s*\n+', '\n\n', text.strip())
    # Remove Jina AI metadata or unwanted headers
    text = re.sub(r'^#.*?\n', '', text, flags=re.MULTILINE)
    # Remove any navigation or footer content (basic filter)
    text = re.sub(r'(\[Previous\].*?\[Next\])|(Springfield! Springfield!.*?$)', '', text, flags=re.DOTALL)
    return text

# Function to scrape a single episode
def scrape_episode(season, episode):
    title = episode["title"]
    url = episode["url"]
    episode_number = episode["episode_number"]
    jina_url = JINA_READER_PREFIX + url

    logger.info(f"Scraping {season}/{title} ({episode_number}) from {jina_url}")

    try:
        # Send request to Jina AI Reader
        response = requests.get(jina_url, timeout=10)
        response.raise_for_status()

        # Get and clean script text
        script_text = clean_script_text(response.text)

        logger.info(f"Successfully scraped {title} ({episode_number})")

        return {
            "episode_title": title,
            "season": season,
            "episode_number": episode_number,
            "script_text": script_text
        }

    except requests.exceptions.RequestException as e:
        logger.error(f"Failed to scrape {title} ({episode_number}): {e}")
        return None

    finally:
        # Rate limiting
        time.sleep(2)

# Collect data for Hugging Face dataset
dataset_dict = {}
logger.info("Starting scraping process")

for season, episode_list in episodes.items():
    logger.info(f"Processing {season}")
    season_data = []

    for episode in episode_list:
        result = scrape_episode(season, episode)
        if result:
            season_data.append(result)

    if season_data:
        # Create a Dataset for the season
        dataset_dict[season] = Dataset.from_list(season_data)
        logger.info(f"Created dataset split for {season} with {len(season_data)} episodes")
    else:
        logger.warning(f"No data collected for {season}")

# Create Hugging Face DatasetDict
if dataset_dict:
    hf_dataset = DatasetDict(dataset_dict)
    logger.info("Created Hugging Face DatasetDict")

    # Save dataset to disk
    output_dir = "/content/black_mirror_scripts_dataset"
    hf_dataset.save_to_disk(output_dir)
    logger.info(f"Saved dataset to {output_dir}")

    # Optional: Push to Hugging Face Hub (uncomment if desired)
    from huggingface_hub import login
    login(token="")
    hf_dataset.push_to_hub("Svngoku/black_mirror_scripts", private=True)
    logger.info("Pushed dataset to Hugging Face Hub")
else:
    logger.error("No data collected for any season")

logger.info("Scraping and dataset creation complete!")
Downloads last month
65