├── .gitignore ├── main.py ├── projects ├── coronationstreet.json ├── corrie.csv └── spouse_converter.py └── readme.md /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | *$py.class 5 | 6 | # C extensions 7 | *.so 8 | 9 | # Distribution / packaging 10 | .Python 11 | build/ 12 | develop-eggs/ 13 | dist/ 14 | downloads/ 15 | eggs/ 16 | .eggs/ 17 | lib/ 18 | lib64/ 19 | parts/ 20 | sdist/ 21 | var/ 22 | wheels/ 23 | *.egg-info/ 24 | .installed.cfg 25 | *.egg 26 | MANIFEST 27 | 28 | # PyInstaller 29 | # Usually these files are written by a python script from a template 30 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 31 | *.manifest 32 | *.spec 33 | 34 | # Installer logs 35 | pip-log.txt 36 | pip-delete-this-directory.txt 37 | 38 | # Unit test / coverage reports 39 | htmlcov/ 40 | .tox/ 41 | .nox/ 42 | .coverage 43 | .coverage.* 44 | .cache 45 | nosetests.xml 46 | coverage.xml 47 | *.cover 48 | .hypothesis/ 49 | .pytest_cache/ 50 | 51 | # Translations 52 | *.mo 53 | *.pot 54 | 55 | # Django stuff: 56 | *.log 57 | local_settings.py 58 | db.sqlite3 59 | 60 | # Flask stuff: 61 | instance/ 62 | .webassets-cache 63 | 64 | # Scrapy stuff: 65 | .scrapy 66 | 67 | # Sphinx documentation 68 | docs/_build/ 69 | 70 | # PyBuilder 71 | target/ 72 | 73 | # Jupyter Notebook 74 | .ipynb_checkpoints 75 | 76 | # IPython 77 | profile_default/ 78 | ipython_config.py 79 | 80 | # pyenv 81 | .python-version 82 | 83 | # celery beat schedule file 84 | celerybeat-schedule 85 | 86 | # SageMath parsed files 87 | *.sage.py 88 | 89 | # Environments 90 | .env 91 | .venv 92 | env/ 93 | venv/ 94 | ENV/ 95 | env.bak/ 96 | venv.bak/ 97 | 98 | # Spyder project settings 99 | .spyderproject 100 | .spyproject 101 | 102 | # Rope project settings 103 | .ropeproject 104 | 105 | # mkdocs documentation 106 | /site 107 | 108 | # mypy 109 | .mypy_cache/ 110 | .dmypy.json 111 | dmypy.json 112 | 113 | # Pyre type checker 114 | .pyre/ 115 | 116 | #vscode 117 | .vscode/ 118 | .vscode/* -------------------------------------------------------------------------------- /main.py: -------------------------------------------------------------------------------- 1 | import json 2 | import re 3 | import time 4 | from typing import Optional, List 5 | from dataclasses import dataclass, field 6 | import numpy as np 7 | import requests 8 | import pandas as pd 9 | from tqdm.autonotebook import tqdm 10 | 11 | # change these variables to change the fandom instance & character category/ies 12 | FANDOM_SITE = 'coronationstreet' 13 | CATEGORY = 'Coronation_Street_characters' 14 | CATEGORIES = [CATEGORY] 15 | JSON_FILE = f"projects/{FANDOM_SITE}.json" 16 | FANDOM_URL = f'https://{FANDOM_SITE}.fandom.com' 17 | API_URL = FANDOM_URL + '/api.php' 18 | 19 | NAMESPACES = [ 20 | ('-2', 'Media'), 21 | ('-1', 'Special'), 22 | ('0', 'Article'), 23 | ('1', 'Talk'), 24 | ('2', 'User'), 25 | ('3', 'User talk'), 26 | ('4', 'Project'), 27 | ('5', 'Project talk'), 28 | ('6', 'File'), 29 | ('7', 'File talk'), 30 | ('8', 'MediaWiki'), 31 | ('9', 'MediaWiki talk'), 32 | ('10', 'Template'), 33 | ('11', 'Template talk'), 34 | ('12', 'Help'), 35 | ('13', 'Help talk'), 36 | ('14', 'Category'), 37 | ('15', 'Category talk'), 38 | ('110', 'Forum'), 39 | ('111', 'Forum talk'), 40 | ('420', 'GeoJson'), 41 | ('421', 'GeoJson talk'), 42 | ('500', 'User blog'), 43 | ('501', 'User blog comment'), 44 | ('502', 'Blog'), 45 | ('503', 'Blog talk'), 46 | ('710', 'TimedText'), 47 | ('711', 'TimedText talk'), 48 | ('828', 'Module'), 49 | ('829', 'Module talk'), 50 | ('1200', 'Message Wall'), 51 | ('1201', 'Thread'), 52 | ('1202', 'Message Wall Greeting'), 53 | ('2000', 'Board'), 54 | ('2001', 'Board Thread'), 55 | ('2002', 'Topic'), 56 | ] 57 | 58 | 59 | def remove_suffix(cell, suffix): 60 | if cell and cell.endswith(suffix): 61 | l = len(suffix) 62 | cell = cell[:-l] 63 | else: 64 | pass 65 | return cell 66 | 67 | 68 | def remove_suffixes(df, col_list, suffix_list): 69 | for col in col_list: 70 | for suffix in suffix_list: 71 | df[col].loc[df[col].str.endswith(suffix, na=False)] = (df[col].loc[df[col].str.endswith(suffix, na=False)] 72 | .apply(lambda x: remove_suffix(x, suffix)) 73 | .str.strip()) 74 | return df 75 | 76 | # These functions are for getting all pages in a category and their infoboxes. 77 | 78 | def make_list_chunks(lst, n=50): 79 | """split a list up into sublist chunks of size n (default 50)""" 80 | return [lst[i:i + n] for i in range(0, len(lst), n)] 81 | 82 | @dataclass 83 | class WikiAPI: 84 | '''A base class for querying a fandom Wiki''' 85 | fandom_site: str = FANDOM_SITE 86 | fandom_url: str = FANDOM_URL 87 | api_url: str = API_URL 88 | category: Optional[str] = CATEGORY 89 | categories: Optional[list] = field(default_factory=list) 90 | namespaces: List = field(default_factory=list) 91 | params: dict = field(default_factory=dict) 92 | 93 | def __post_init__(self): 94 | self.namespaces = NAMESPACES 95 | self.params = {'action': 'query', 96 | 'format': 'json', 97 | } 98 | 99 | def scrape(self): 100 | pass 101 | 102 | def parse(self): 103 | pass 104 | 105 | def build(self): 106 | self.scrape() 107 | self.parse() 108 | 109 | def get_all_namespaces(self, api_url=API_URL): 110 | params = {'action': 'query', 111 | 'format': 'json', 112 | 'meta': 'siteinfo', 113 | 'siprop': 'namespaces', 114 | } 115 | r = requests.get(api_url, params=params) 116 | data = json.loads(r.text) 117 | namespaces = data['query']['namespaces'] 118 | nses = [(k, v.get('canonical', '*')) for k, v in namespaces.items()] 119 | return nses 120 | 121 | def get_all_pages(self, namespace=None): 122 | '''Get all pages from a particular namespace (defaults to articles).''' 123 | params = {'action': 'query', 124 | 'format': 'json', 125 | 'list': 'allpages', 126 | 'aplimit': '500', 127 | 'apfilterredir': 'nonredirects', 128 | 'apcontinue': '0', 129 | } 130 | if namespace is None: 131 | namespace = 0 132 | params.update({'apnamespace': namespace}) 133 | all_pages = [] 134 | cont = "0" 135 | while cont != "1": 136 | r = requests.get(API_URL, params=params) 137 | data = json.loads(r.text) 138 | pages = data['query']['allpages'] 139 | pages = [(x['pageid'], x['title']) for x in pages] 140 | all_pages.extend(pages) 141 | try: 142 | apcontinue = data['continue']['apcontinue'] 143 | except KeyError: 144 | apcontinue = "1" 145 | cont = apcontinue 146 | params.update({'apcontinue': apcontinue}) 147 | time.sleep(1) 148 | return all_pages 149 | 150 | 151 | @dataclass 152 | class WikiCategory(WikiAPI): 153 | '''Given a category or list of categories, get the subcategories and the pages in those subcategories. 154 | Queries the API for both categories & pages at the same time.''' 155 | recursive: bool = True 156 | group_pages: bool = False 157 | 158 | def __post_init__(self): 159 | super().__post_init__() 160 | self.params.update({'list': 'categorymembers', 161 | 'cmtype': 'subcat|page', 162 | 'cmtitle': f'Category:{self.category}', 163 | 'cmlimit': 500, 164 | 'cmcontinue': '', 165 | }) 166 | if not self.categories: 167 | self.categories = [self.category] 168 | 169 | def scrape(self): 170 | self.category_members = self.get_category_members() 171 | self.subcats = self.category_members.get('subcats', None) 172 | self.pages = self.category_members.get('pages', None) 173 | if not self.group_pages: 174 | self.pageids = [x[0] for x in self.pages] 175 | self.titles = sorted([x[1] for x in self.pages]) 176 | 177 | def get_category_members(self, categories=None, recursive=None, group_pages=None, params=None): 178 | if categories is None: 179 | categories = self.categories 180 | if recursive is None: 181 | recursive = self.recursive 182 | if group_pages is None: 183 | group_pages = self.group_pages 184 | if params is None: 185 | params = self.params 186 | items = {} 187 | items['categories'] = categories 188 | items['subcats'] = [] 189 | if group_pages: 190 | items['pages'] = {} 191 | else: 192 | items['pages'] = [] 193 | 194 | print('Retrieving category members:\n') 195 | for category in tqdm(items['categories']): 196 | params['cmtitle'] = f'Category:{category}' 197 | params['cmcontinue'] = 0 198 | while params['cmcontinue'] != 1: 199 | r = requests.get(API_URL, params=params) 200 | # print(r.url) 201 | data = json.loads(r.text) 202 | results = data['query']['categorymembers'] 203 | subcats = [x['title'].replace('Category:', '') for x in results if int(x['ns']) == 14] 204 | items['subcats'].extend(subcats) 205 | pages = [(x['pageid'], x['title']) for x in results if int(x['ns']) == 0] 206 | if group_pages: 207 | if not items['pages'].get(category, None): 208 | items['pages'][category] = [] 209 | items['pages'][category].extend(pages) 210 | else: 211 | items['pages'].extend(pages) 212 | if recursive: 213 | # append new categories to the category list 214 | items['categories'].extend(subcats) 215 | if 'batchcomplete' in data.keys(): 216 | params['cmcontinue'] = 1 217 | else: 218 | params['cmcontinue'] = data['continue']['cmcontinue'] 219 | time.sleep(1) 220 | # prune duplicates (pages likely to re-occur across multiple subcategories) 221 | if not group_pages: 222 | for k, v in items.items(): 223 | items[k] = sorted(list(set(v))) 224 | return items 225 | 226 | 227 | @dataclass 228 | class WikiInfobox(WikiAPI): 229 | '''Given a list of wikipages, scrape their infoboxes.''' 230 | pages: Optional[list] = field(default_factory=list) 231 | titles: Optional[list] = field(default_factory=list) 232 | recursive: bool = True 233 | by_category: bool = True 234 | standardize_case: bool = True 235 | alert_empty: bool = True 236 | 237 | def __post_init__(self): 238 | super().__post_init__() 239 | self.params.update({ 240 | 'prop': 'revisions', 241 | 'rvprop': 'content', 242 | 'rvsection': '0', 243 | 'rvslots': '*', 244 | }) 245 | if self.pages and not self.titles: 246 | self.titles = [x[1] for x in self.pages] 247 | 248 | def scrape(self): 249 | if self.by_category: 250 | if not self.categories: 251 | self.categories = [self.category] 252 | if not self.pages and not self.titles: 253 | wikicat = WikiCategory(categories=self.categories, recursive=self.recursive) 254 | wikicat.scrape() 255 | self.pages = wikicat.pages 256 | self.pageids = wikicat.pageids 257 | self.titles = wikicat.titles 258 | elif not self.titles: 259 | self.pageids = [x[0] for x in self.pages] 260 | self.titles = [x[1] for x in self.pages] 261 | if self.titles: 262 | self.params.update({'titles': self.titles}) 263 | self.raw_infoboxes = self.get_raw_infoboxes() 264 | self.matched_raw_infoboxes = self.match_names_to_infoboxes() 265 | 266 | def parse(self): 267 | if self.titles: 268 | self.unsorted_infoboxes = self.get_parsed_infoboxes() 269 | self.infoboxes = self.sort_infoboxes_by_template() 270 | self.dfs = self.build_dfs_infobox() 271 | if len(self.dfs) == 1: 272 | self.df = list(self.dfs.values())[0] 273 | 274 | def get_raw_infoboxes(self, titles=None, params=None): 275 | '''From a list of titles, get the raw json for their infoboxes''' 276 | if titles is None: 277 | titles = self.titles 278 | try: 279 | assert type(titles) == list 280 | except AssertionError: 281 | raise TypeError 282 | if params is None: 283 | params = self.params 284 | 285 | # break up titles into chunks of 50 or fewer 286 | title_chunks = make_list_chunks(titles) 287 | 288 | raw_infoboxes = {} 289 | print('Retrieving infoboxes for each page title:') 290 | for chunk in tqdm(title_chunks): 291 | time.sleep(1) # add sleep so don't overwhelm server 292 | title_list = '|'.join([x for x in chunk]) 293 | params.update({'titles': title_list}) 294 | r = requests.get(API_URL, params=params) 295 | json_values = r.json() 296 | pages = json_values['query']['pages'] 297 | boxes = {int(k): v['revisions'][0]['slots']['main']['*'] for k, v in pages.items() if int(k) > 0} 298 | # warn if missing infoboxes 299 | missing_boxes = {k: v for k, v in pages.items() if int(k) < 1} 300 | if missing_boxes: 301 | for v in missing_boxes.values(): 302 | print(f"Infobox page missing: {v['title']}") 303 | raw_infoboxes.update(boxes) 304 | 305 | return raw_infoboxes 306 | 307 | def process_value(self, val): 308 | """within the context of an infobox to be parsed, clean up the value after the '=' sign.""" 309 | val = val.replace("[[","") 310 | val = val.replace("]]","") 311 | val = val.replace("}}","") 312 | val = val.replace("{{","") 313 | val = re.sub("([\(\[]).*?([\)\]])", "\g<1>\g<2>", val) 314 | val = val.replace("()","") 315 | 316 | val = val.lstrip('*').strip() 317 | 318 | #remove any training white spaces left 319 | ##if we have a br the k becomes an array 320 | 321 | if any(x in val for x in ['
', '
', '
']): 322 | val = val.replace('
', '
').replace('
', '
') 323 | val = val.split('
') 324 | val = [x.strip() for x in val] 325 | 326 | # transform true/false to boolean 327 | if type(val) == str and val.lower() == 'true': 328 | val = True 329 | elif type(val) == str and val.lower() == 'false': 330 | val = False 331 | return val 332 | 333 | def parse_infobox(self, info_json, standardize_case=None): 334 | if standardize_case is None: 335 | standardize_case = self.standardize_case 336 | infoboxes = {} 337 | infobox_name = '' 338 | k = '' 339 | json_lines = info_json.splitlines() 340 | for i, line in enumerate(json_lines): 341 | is_list = False 342 | if re.findall(r'\{\{Infobox.*?', line): 343 | infobox_name = re.findall(r'Infobox.*', line)[0].strip().replace('_', ' ') 344 | infoboxes[infobox_name] = {} 345 | elif line.startswith('|'): 346 | # process k 347 | k = line.partition('=')[0].strip()[1:] 348 | k = k.strip() 349 | if self.standardize_case: 350 | k = k.lower() 351 | 352 | # process val 353 | val1 = line.partition('=')[-1].strip() 354 | val = self.process_value(val1) 355 | if type(val) == str and (val1.startswith('*') or not len(val)): 356 | is_list = True 357 | if val1.startswith('*'): 358 | assert len(val1.split('*')) == 2 359 | item_1 = val.lstrip('*').strip() 360 | val = [item_1] 361 | elif json_lines[i+1].startswith('*'): 362 | val = [] 363 | else: 364 | is_list = False 365 | if is_list: 366 | assert json_lines[i+1].startswith('*') 367 | counter = 0 368 | idx = i 369 | while counter < 20: 370 | # look ahead for other list members, stopping at next parameter field 371 | if json_lines[idx+1].startswith('*'): 372 | new_item = self.process_value(json_lines[idx+1]) 373 | val.append(new_item) 374 | idx += 1 375 | counter += 1 376 | else: 377 | break 378 | 379 | elif type(val) == str: 380 | assert '*' not in val 381 | 382 | #process k 383 | if not infobox_name: 384 | print('no infobox name:', k, val[:20]) 385 | else: 386 | infoboxes[infobox_name][k] = val 387 | 388 | return infoboxes 389 | 390 | def match_names_to_infoboxes(self, 391 | categories=None, 392 | pages=None, 393 | titles=None, 394 | pageids=None, 395 | infoboxes=None): 396 | '''Uses pageids to match title/name tuple to raw infobox json.''' 397 | if categories is None: 398 | categories = self.categories 399 | if pages is None: 400 | pages = self.pages 401 | if titles is None: 402 | if not hasattr(self, 'titles') or not self.titles: 403 | titles = [x[1] for x in pages] 404 | else: 405 | titles = self.titles 406 | if pageids is None: 407 | if not hasattr(self, 'pageids') or not self.pageids: 408 | pageids = [x[0] for x in pages] 409 | else: 410 | pageids = self.pageids 411 | if infoboxes is None: 412 | infoboxes = self.raw_infoboxes 413 | matched_raw_infoboxes = {} 414 | for pid in pageids: 415 | title = next(x[1] for x in pages if x[0] == pid) 416 | matched_raw_infoboxes[(pid, title)] = infoboxes[pid] 417 | return matched_raw_infoboxes 418 | 419 | def get_parsed_infoboxes(self, titles=None, raw_infoboxes=None, standardize_case=None): 420 | '''Parses the raw infoboxes into dicts from matched title json dict.''' 421 | if titles is None and raw_infoboxes is None: 422 | titles = self.titles 423 | if raw_infoboxes is None: 424 | raw_infoboxes = self.raw_infoboxes 425 | if standardize_case is None: 426 | standardize_case = self.standardize_case 427 | 428 | matched_infoboxes = self.match_names_to_infoboxes(titles=titles, infoboxes=raw_infoboxes) 429 | 430 | infoboxes = {k: self.parse_infobox(v, standardize_case=standardize_case) for k, v in matched_infoboxes.items()} 431 | return infoboxes 432 | 433 | def get_infoboxes_for_title(self, title, standardize_case=None, parsed=True): 434 | """For a single title, get the article infoboxes. Do not use to iterate! 435 | Use chunking via `self.get_parsed_infoboxes()` instead.""" 436 | if standardize_case is None: 437 | standardize_case = self.standardize_case 438 | title = '_'.join(title.split()) 439 | fullurl = '/'.join([FANDOM_URL, title]) 440 | r = requests.get(fullurl, params={'action': 'raw', 441 | 'section': '0', 442 | 'format': 'json', 443 | }) 444 | page = r.text 445 | if parsed: 446 | parsed_infobox = self.parse_infobox(page, standardize_case=standardize_case) 447 | return parsed_infobox 448 | else: 449 | return page 450 | 451 | def write_infobox_json(self, categories=None, df=None): 452 | '''Output infobox dict to json file''' 453 | if categories is None: 454 | categories = self.categories 455 | if df is None: 456 | df = next(iter(self.dfs.values())) 457 | df = df.set_index('page_title', drop=True) 458 | json_data = df.to_json(indent=4, orient='index') 459 | with open(JSON_FILE, 'w') as f: 460 | f.write(json_data) 461 | 462 | def sort_infoboxes_by_template(self, infoboxes=None, alert_empty=None): 463 | if alert_empty is None: 464 | alert_empty = self.alert_empty 465 | if infoboxes is None: 466 | infoboxes = self.unsorted_infoboxes 467 | sorted_infoboxes = {} 468 | for k, v in infoboxes.items(): 469 | for infobox_name, infobox in v.items(): 470 | if not sorted_infoboxes.get(infobox_name, None): 471 | sorted_infoboxes[infobox_name] = {} 472 | sorted_infoboxes[infobox_name][k] = infobox 473 | if alert_empty: 474 | empty = [k for k, v in infoboxes.items() if not v.values()] 475 | if len(empty): 476 | print(f"These entries are missing infoboxes and will not be in df: {empty}") 477 | return sorted_infoboxes 478 | 479 | def build_df_infobox(self, infoboxes): 480 | df = pd.DataFrame.from_dict(infoboxes, orient='index') 481 | df.index.set_names(["pageid", "page_title"], inplace=True) 482 | df = df.reset_index() 483 | df.pageid = df.pageid.astype(int) 484 | df = df.replace('PAGENAME', np.NaN) 485 | return df 486 | 487 | def build_dfs_infobox(self, infoboxes=None): 488 | if infoboxes is None: 489 | infoboxes = self.infoboxes 490 | dfs_dict = {} 491 | for infobox_name, val in infoboxes.items(): 492 | dfs_dict[infobox_name] = self.build_df_infobox(val) 493 | df_name = 'df_' + infobox_name.replace('Infobox ', '').lower() 494 | setattr(self, df_name, dfs_dict[infobox_name]) 495 | return dfs_dict 496 | 497 | 498 | if __name__ == "__main__": 499 | print(f'Getting {CATEGORIES} infoboxes from fandom site {FANDOM_SITE}\n') 500 | # create WikiInfobox instance with default values 501 | wi = WikiInfobox(categories=CATEGORIES, recursive=False) 502 | wi.build() 503 | 504 | # output primary infobox dataframe to json file 505 | print(f'Writing infoboxes to {JSON_FILE}\n') 506 | wi.write_infobox_json() 507 | 508 | -------------------------------------------------------------------------------- /projects/corrie.csv: -------------------------------------------------------------------------------- 1 | 1st Woman (Episode 1653),Unnamed 2 | Aaron (2011 character),Christine |Christine 3 | Aggie Bailey,Ed Bailey 4 | Agnes Greenwood,George Greenwood 5 | Agnes MacLean,Jim MacLean 6 | Alan Bradley,Pat Bradley 7 | Alan Howard,Laura Howard 8 | Alan Hoyle,Dorothy Hoyle 9 | Albert Tatlock,Bessie Tatlock|Bessie Vickery 10 | Alec Gilroy,Joyce Gilroy|Joyce Crosby 11 | Alec Lawton,A wife 12 | Alf Roberts,Phyllis Roberts 13 | Alfred Wormold,Amy Wormold
One other wife 14 | Alice Burgess,Sam Burgess 15 | Alice Nelson,Jim Nelson 16 | Alison Dunkley,Brian Dunkley 17 | Alison Oakley,A husband 18 | Alison Soames,Edwin Soames 19 | Alison Webster,Kevin Webster 20 | Alma Halliwell,Jim Sedgewick 21 | Amy Wilton,Lionel Wilton 22 | Andrea Beckett,Neil Beckett 23 | Angela Harris,Tommy Harris 24 | Angela Hawthorne,Derek Wilton 25 | Angie Appleton,Jude Appleton 26 | Angus Spellman,Geraldine Spellman 27 | Ann Marie Sharma,Dinesh Sharma 28 | Ann McIntyre,Joe McIntyre 29 | Anna Windass,Eddie Windass 30 | Annabelle Johnson,Leonard Johnson 31 | Anne Foster,Sam Foster 32 | Annie Walker,Jack Walker 33 | Anthony Stephens,Isabel Stephens 34 | Archie Crabtree,Doris Crabtree 35 | Archie Dodds,Renee Dodds 36 | Arlene Jones,Arthur Jones 37 | Armistead Caldwell,Minnie Caldwell|Minnie Carlton 38 | Arnold Swain,Margaret Swain 39 | Arnold Tanner,Elsie Tanner|Elsie Grimshaw
Norah Dawson 40 | Arthur Dabner,Barbara Dabner 41 | Arthur Jones,Arlene Jones 42 | Arthur Walker,Cissie Walker|Cissie Pickles 43 | Arthur Watts,Eunice Watts 44 | Arthur Webster,Mrs Webster 45 | Ashley Peacock,Maxine Heavey 46 | Audrey Fleming,Dickie Fleming 47 | Audrey Roberts,Alf Roberts 48 | Aunty Monica,a husband 49 | Barbara (2008 character),Neville |Neville 50 | Barbara Dabner,Arthur Dabner 51 | Barbara Morgan,Dennis Morgan 52 | Barbara Platt,Barry Platt 53 | Barry Connor,Helen Connor 54 | Barry Platt,Barbara Platt 55 | Beattie Pearson,Norman Pearson 56 | Becky McDonald,Steve McDonald 57 | Ben Fielding,Vicky Fielding 58 | Bernard McKenna,Mary McKenna 59 | Bernard Snape,Sylvia Snape 60 | Bert Tilsley,Ivy Tilsley|Ivy Nelson 61 | Bertha Croston,Jack Croston 62 | Bertha Lumley,Nathaniel Lumley 63 | Beryl Peacock,Sam Peacock 64 | Bessie Proctor,Walter Proctor 65 | Bet Lynch,Alec Gilroy 66 | Beth Sutherland,Darryl Parkins 67 | Betty Lawson,A husband 68 | Betty Williams,Cyril Turpin 69 | Bev Unwin,Charlie Unwin 70 | Bill Fielding,Muriel Fielding 71 | Bill Gregory,Phyllis Gregory 72 | Bill Webster,Alison Webster |Alison Cartwright 73 | Billy Rabbitt,Peggy Rabbitt 74 | Billy Williams,Betty Turpin 75 | Blanche Hunt,Donald Hunt 76 | Bob (2005 character),2 ex-wives 77 | Bob Birchall,Margaret Birchall 78 | Bob Chadwick (1990 character),Mrs Chadwick |Mrs Chadwick 79 | Bob Statham,Joan 80 | Bob Wakefield,Joan Wakefield 81 | Bob Wheeler,Eunice Wheeler 82 | Bob Whitely,Margaret Whitely|Margaret Pearce 83 | Boyd Rickson,Lynette Rickson 84 | Brenda Fearns,Mr Fearns 85 | Brenda Palin,Mr Palin 86 | Brenda Summers,John Summers 87 | Brenda Taylor,Randolph Taylor 88 | Brendan Finch,Bridget Finch 89 | Brendan Scott,Debi Scott 90 | Brian Dunkley,Alison Dunkley 91 | Brian Hoggatt,Margaret 92 | Brian Packham,Margaret Packham 93 | Brian Roscoe,Angie Roscoe 94 | Brian Tilsley,Gail Potter 95 | Brian Tully,Maureen Tully 96 | Bridget Brennan,Michael Brennan 97 | Bridget Finch,Brendan Finch 98 | Bulldozer Driver (Episode 868),1 wife 99 | Candice Stowe,a husband 100 | Carl Armstrong,Tricia Armstrong 101 | Carla Connor,Paul Connor 102 | Carol Baldwin,Danny Baldwin 103 | Carol Copeland,Roger Copeland 104 | Caroline Clegg,Gordon Clegg 105 | Cathy Matthews,Alan Matthews 106 | Celia Groves,George Groves 107 | Celia Hetherington,a husband 108 | Chalkie Whitely,Mary Whitely 109 | Charlie Ramsden,Matt Ramsden 110 | Charlie Stubbs,A wife 111 | Cheryl Gray,Chris Gray 112 | Chloe Tipton,a husband 113 | Chris Gray,Cheryl Gray 114 | Chris Melton,Toni Melton 115 | Chrissy (Episode 8584),Husband 116 | Christian Gatley,Holly Gatley 117 | Christine (2011 character),Aaron |Aaron 118 | Christine Appleby,Colin Appleby 119 | Christine Peters,Jack Peters 120 | Cilla Battersby-Brown,Les Battersby 121 | Cindy Watson,Ross Watson 122 | Cissie Burton,Harold 123 | Claire Connell,Ray Connell 124 | Claire Palmer,Jeff Palmer 125 | Claire Peacock,Ashley Peacock 126 | Clarissa Mason,Harry Mason 127 | Clifford Duckworth,Elsie Duckworth|Elsie Baxter 128 | Clive Middleton,Pam Middleton 129 | Colin Appleby,Christine Hardman 130 | Colin Barnes,Kath Barnes 131 | Colin Baxter,Emma Baxter 132 | Colin Callen,an ex-wife 133 | Colin Jackson,Sue Jackson 134 | Colin Lomax,Karen Lomax 135 | Concepta Regan,Harry Hewitt 136 | Connie Clayton,Harry Clayton 137 | Connie Rathbone,Eric Rathbone 138 | Conrad Farmer,Mrs Farmer 139 | Curly Watts,Raquel Wolstenhulme 140 | Cyril Turpin,Betty Turpin|Elizabeth Preston 141 | DP,A wife 142 | Daisy Hibbert,Harold Bradshaw 143 | Daniel Osbourne,Sinead Tinker 144 | Danny Baldwin,Carol Baldwin 145 | Danny Burrows,Sandra Burrows 146 | Danny Stratton,Vicky Stratton 147 | Darren Dobbs,Jackie Dobbs 148 | Darryl Parkins,Beth Tinker 149 | Dave (Episode 3238),A wife 150 | Dave Craig,A wife 151 | Dave Smith,Lillian Smith 152 | David Barlow,Irma Ogden 153 | David Denton,Susan Denton 154 | David Platt,Kylie Turner 155 | Dawn Digby,Harold Digby 156 | Debbie Allinson,Trevor Allinson 157 | Debi Scott,Brendan Scott 158 | Deirdre Barlow,Ray Langton 159 | Denise Osbourne,Frank Osbourne 160 | Dennis Morgan,Barbara Morgan 161 | Dennis Tanner,Jenny Sutton 162 | Derek (2007 character),Linda |Linda 163 | Derek Heavey,Doreen Heavey|Doreen Outhwaite 164 | Derek Wilton,Angela Hawthorne 165 | Des Barnes,Steph Barnes|Stephanie Jones 166 | Des Foster,Edith Foster 167 | Dev Alahan,Sunita Parekh 168 | Diane Mellor,Robin Mellor 169 | Dickie Fleming,Audrey Fleming|Audrey Bright 170 | Dinesh Sharma,Ann Marie Sharma 171 | Dirty Dick,Winnie Thomas|Winnie Deakin 172 | Dolly Fairbrother,William Fairbrother 173 | Dom (Episode 8927),Lindsey |Lindsey 174 | Don Ashton,Mrs Ashton 175 | Don Brennan,Pat Brennan|Pat O'Connor 176 | Doreen Braithwaite,1 husband 177 | Doreen Fenwick,Harold Thompson 178 | Doreen Heavey,Derek Heavey 179 | Doreen Horton,Jeff Horton 180 | Doreen Warburton,a husband 181 | Doris (Episode 2134),Unnamed Husband |husband 182 | Doris Babbage,Eric Babbage 183 | Dorothy Hoyle,Alan Hoyle 184 | Dot Greenhalgh,Walter Greenhalgh 185 | Dot Stockwell,Wilf Stockwell 186 | Dot Sutherland,Eric Sutherland 187 | Dougie Ryan,1 wife 188 | Duggie Ferguson,Laura Ferguson 189 | Dulcie Froggatt,Ralph Froggatt 190 | Duncan Morgan,Julia Morgan 191 | Duncan Radfield,May Radfield 192 | Ed Bailey,Aggie Bailey 193 | Eddie Ramsden,Marie Lancaster 194 | Eddie Seddon,Elsie Seddon|Elsie Hopwood 195 | Eddie Windass,Anna Windass 196 | Eddie Yeats,Marion Willis 197 | Edie Burgess,Sidney Burgess 198 | Edith Tatlock,Alfred Tatlock 199 | Edna Gee,Fred Gee 200 | Edna Miller,Leslie 201 | Edwin Mason,Letty Mason 202 | Edwin Soames,Alison Soames 203 | Effie Spicer,Peter Spicer 204 | Eileen Grimshaw,Pat Phelan 205 | Eileen Wolstenhulme,Larry Wolstenhulme 206 | Elaine Webster,Bill Webster 207 | Ellen Page,Norman Page 208 | Ellen Smith,John Smith 209 | Elsa Tilsley,Nick Tilsley 210 | Elsie Duckworth,Clifford Duckworth 211 | Elsie Lappin,Tommy Foyle 212 | Elsie Seddon,Eddie Seddon 213 | Elsie Tanner,Arnold Tanner
Steve Tanner|Stephen Tanner
Alan Howard 214 | Emily Bishop,Ernest Bishop 215 | Emma Baxter,Colin Baxter 216 | Emma Watts,Curly Watts|Norman Watts 217 | Ena Sharples,Alfred Sharples 218 | Enid Dobson,Ralph Dobson 219 | Eric Babbage,Doris Babbage 220 | Eric Firman,Edith Firman 221 | Eric Sutherland,Dot Sutherland 222 | Eric Talford,Eric's wife|a wife 223 | Eric's wife,Eric Talford 224 | Ernest Bishop,Emily Nugent 225 | Ethel Bostock,Will Bostock 226 | Ethel Fox,Bert Fox 227 | Ethel Needham,Sid Needham 228 | Eugene Clelland,a wife 229 | Eunice Gee,Mr. Nuttall 230 | Eunice Watts,Arthur Watts 231 | Eunice Wheeler,Bob Wheeler 232 | Eve Wilson,George Wilson 233 | Evelyn Elliott,Ray Sykes 234 | Evelyn Plummer,Harold Plummer 235 | Faye-Marie Schofield,Tom Schofield |Tom Schofield 236 | Fiona Middleton,John Brooker 237 | Fiz Stape,John Stape 238 | Florrie Lindley,Norman Lindley 239 | Frank (Foster parent),Rachel |Rachel 240 | Frank Barlow,Ida Barlow|Ida Leathers 241 | Frank Bell,Margaret Bell 242 | Frank Nichols,Bella Nichols 243 | Frank Pritchard,Maggie Pritchard 244 | Frank Worral,A wife 245 | Frankie Baldwin,Danny Baldwin 246 | Frankie Baldwin (Sam Kydd),Mary Baldwin 247 | Fraser Henderson,Jacqui Henderson 248 | Fred Elliott,Sybil Elliott 249 | Fred Gee,Edna Gee 250 | Fred Hamilton,Margaret "Maggie" Hamilton 251 | Fred Jackson,Mary Jackson 252 | Freda Bright,Mr Bright 253 | Freda Loftus,Ted Loftus 254 | Freddie Smith,Sadie Smith 255 | Gail Rodwell,Brian Tilsley 256 | Gareth Brannigan,a wife 257 | Gary Mallett,Judy Mallett|Judy Smedley 258 | Geoff Metcalfe,a wife 259 | George Bannister,Mrs. Bannister 260 | George Davies,Hilda Davies 261 | George Greenwood,Agnes Greenwood 262 | George Groves,Celia Groves 263 | George Handforth,Mary Handforth 264 | George Ormerod,Helen Ormerod 265 | George Shaw,Mrs Shaw |Mrs Shaw 266 | George Trench,Angela Hawthorne 267 | George Wardle,Myra Wardle 268 | George Wilson,Two wives 269 | Gerald Prince,1 wife 270 | Geraldine Spellman,Angus Spellman 271 | Gerry Woodward,Maggie Redman 272 | Gina Seddon,Colin 273 | Gladys Braithwaite,Cyril Braithwaite 274 | Gladys Turnbull,Mr Turnbull 275 | Gordon Barrett,Jill Barrett 276 | Gordon Clegg,Caroline Wilson 277 | Gordon Davies,Joan Walker 278 | Graeme Proctor,Xin Chiang 279 | Graham Farrell,Linda Farrell 280 | Greig Hodge,Josie Hodge 281 | Gwen Davies,Laurie Loveday 282 | Hank (Episodes 9067/8),Hilary |Hilary 283 | Harish Bhatia,Raveena Bhatia 284 | Harold Chapman,Clarice Chapman 285 | Harold Dewhurst,Edith Dewhurst 286 | Harold Digby,Dawn Digby 287 | Harry Bailey,Nellie Fairclough 288 | Harry Bates,Rita Littlewood 289 | Harry Clayton,Connie Clayton 290 | Harry Gee,Norma Gee 291 | Harry Hewitt,Lizzie Hewitt|Elizabeth Harding 292 | Harry Mason,Clarissa Mason 293 | Harry Newton,a wife 294 | Harry Redman,Maggie Redman 295 | Hassan Habeeb,Saira Habeeb 296 | Hayley Cropper,Roy Cropper 297 | Hazel Lightfoot,Greg Lightfoot 298 | Heather Parks,Gavin Parks 299 | Helen Connor,Barry Connor 300 | Helen Ormerod,George Ormerod 301 | Henry Newton,Cressida Lanscombe 302 | Hilary (Episodes 9067/8),Hank |Hank 303 | Hilda Barnett,Mr Barnett 304 | Hilda Davies,George Davies 305 | Hilda Ogden,Stan Ogden|Stanley Ogden 306 | Husband (Episode 2134),Doris |Doris 307 | Iain Gibson,Verity Gibson 308 | Ian Bentley,Sharon Gaskell 309 | Ian Davenport,Justine Davenport 310 | Ian Quinn,Kate Quinn 311 | Ida Barlow,Frank Barlow 312 | Idris Hopkins,Vera Hopkins 313 | Imran Habeeb,Sabeen Habeeb 314 | Irene Barnes,Husband 315 | Iris Merry,a husband 316 | Irma Barlow,David Barlow 317 | Isabel Stephens,Anthony Stephens 318 | Ivan Cheveski,Linda Cheveski|Linda Tanner 319 | Ivor Priestley,Angela Hawthorne 320 | Ivy Brennan,Arthur 321 | Jack Croston,Bertha Croston|Bertha Hopwood 322 | Jack Duckworth,Vera Duckworth|Veronica Burton 323 | Jack Tilsley,Ivy Tilsley 324 | Jack Walker,Annie Walker|Anne Beaumont 325 | Jackie Dobbs,Darren Dobbs 326 | Jackie Ingram,Peter Ingram 327 | Jackie Moffatt,Geoff Moffatt 328 | James Nugent,Agnes Nugent 329 | Jane Kenworthy,Mark Kenworthy 330 | Jane Rayner,Jeff Rayner 331 | Janet Bamford (character),John Bamford 332 | Janet Barlow,Ken Barlow 333 | Janet Powers,Vinnie Powers 334 | Janet White,Rob White 335 | Janice Battersby,Les Battersby 336 | Jason Grimshaw,Sarah Platt 337 | Jayesh Parekh,Beth Parekh
Rhea Parekh 338 | Jean Casey,Tom Casey 339 | Jean Wilkins,Frank Wilkins 340 | Jeff (Episode 22),Wife 341 | Jeff Horton,Doreen Horton 342 | Jemma Marsden,Tim Marsden 343 | Jenny Connor,Mr Midgeley 344 | Jenny Tanner,Dennis Tanner 345 | Jerry Booth,Myra Dickinson 346 | Jerry Hopkins,Rebecca Hopkins 347 | Jerry Morton,Teresa Bryant 348 | Jesse Chadwick,Shirley Chadwick 349 | Jessica Midgeley,Peter Barlow 350 | Jill Barrett,Philip Barrett 351 | Jim McDonald,Liz McDonald|Liz Greenwood 352 | Jim Nelson,Alice Nelson|Alice Marshall 353 | Jim Schofield (1962 character),May Schofield 354 | Jim Sedgewick,Alma Halliwell 355 | Jimmy Clayton,Ronnie Clayton 356 | Jimmy Graham,Muriel Graham 357 | Joan Akers,Brian 358 | Joan Bannister,Wally Bannister 359 | Joan Corrie,William Corrie 360 | Joan Davies,Gordon Davies 361 | Joan Lowther,Robert Lowther 362 | Joan Wakefield,Bob Wakefield 363 | Joe Hibbert,Daisy Hibbert|Daisy Bradshaw 364 | Joe McIntyre,Ann McIntyre 365 | John (Episode 9467),Tanya |Tanya 366 | John Brooker,Fiona Middleton 367 | John Dewhurst,Mrs Dewhurst 368 | John Hardacre,Diane Evans 369 | John Robertson,Mrs Robertson 370 | John Smith,Ellen Smith 371 | John Stape,Fiz Brown 372 | John Summers,Brenda Summers 373 | John Thornley,Mrs Thornley 374 | Johnny Alexander,Mrs Alexander 375 | Johnny Connor,Louisa Connor 376 | Johnny Johnson,Lucy Johnson 377 | Johnny Webb,Maureen Webb 378 | Jon Lindsay,Linda Lindsay 379 | Joni Preston,Robert Preston 380 | Josie Clarke,a husband 381 | Josie Hodge,Greig Hodge 382 | Jude Appleton,Angie Appleton 383 | Judy Mallett,Gary Mallett 384 | Julia Morgan,Duncan Morgan 385 | Julia O'Driscoll,Richie O'Driscoll 386 | Julie Carp,A husband 387 | Julie Carp (2015 character),Divorced 388 | Justine Davenport,Ian Davenport 389 | Kal Nazir,Jamila Nazir 390 | Karen Lomax,Colin Lomax 391 | Karen McDonald,Steve McDonald 392 | Karl Munro,Stella Price 393 | Kate Quinn,Ian Quinn 394 | Kath Barnes,Colin Barnes 395 | Kathleen Nelson,a husband 396 | Kathy Pritchard,Colin Pritchard 397 | Keith Appleyard,Shirley Appleyard 398 | Keith Hesketh,Sandra Hesketh 399 | Ken Barlow,Valerie Tatlock
Janet Reid
Deirdre Langton 400 | Kevin Webster,Sally Seddon 401 | Kirk Sutherland,Beth Tinker 402 | Kylie Platt,David Platt 403 | Landlord (Darren Bancroft),Wife 404 | Landlord (Episodes 8619/20),Wife 405 | Larry Wolstenhulme,Eileen Wolstenhulme 406 | Laura Collins,A husband 407 | Laura Howard,Alan Howard 408 | Laurence Carnegie,Wife 409 | Laurie Frazer,Rosemary Frazer 410 | Leanne Battersby,Nick Tilsley 411 | Len Fairclough,Nellie Briggs 412 | Leonard Johnson,Annabelle Johnson 413 | Les Battersby-Brown,Janice Lee 414 | Les Boden,Mrs Boden 415 | Les Clegg,Maggie Cooke|Maggie Preston 416 | Lesley Kershaw,Paul Kershaw 417 | Liam Connor,Maria Sutherland 418 | Lillian Smith,Dave Smith 419 | Lilly Richardson,Mike Richardson 420 | Lily Haddon,Wilf Haddon 421 | Linda Baldwin,Mike Baldwin 422 | Linda Cheveski,Ivan Cheveski 423 | Linda Farrell,Graham Farrell 424 | Linda Hancock,Owen Armstrong 425 | Linda Lindsay,Jon Lindsay 426 | Lindsey (Episode 8927),Dom |Dom 427 | Lindsey Gordon,Tony Gordon 428 | Lionel Petty,Mary Petty 429 | Lisa Duckworth,Terry Duckworth 430 | Liz Brocklebank,Stanley Fairclough 431 | Liz McDonald,Jim McDonald 432 | Lolly,Tom 433 | Lorna Smeaton,Chris Smeaton 434 | Lucy Barlow,Peter Barlow 435 | Lucy Johnson,Johnny Johnson 436 | Lynn Johnson,Roy Johnson 437 | Maggie Cooke,Les Clegg 438 | Maggie Redman,Harry Redman 439 | Maggie Tully,Brian Tully 440 | Malcolm Fox,Brenda Fox 441 | Malcolm Phillips,Margaret Phillips 442 | Malcolm Reid,Joyce Reid 443 | Man (Episode 6587),Woman |Woman 444 | Man at Job Centre (Episode 2736),Wife 445 | Mandy Kamara,Johnny Kamara 446 | Marc Selby,Tricia Selby 447 | Margaret (Episode 6087),Geoff |Geoff 448 | Margaret Beecham,A husband 449 | Margaret Bell,Frank Bell 450 | Margaret Cropper,St. John Cropper 451 | Margaret Packham,Brian Packham 452 | Margaret Reece,Paul Reece 453 | Margaret Riley,Tom Riley 454 | Margaret Swain,Arnold Swain 455 | Maria Connor,Liam Connor 456 | Marian Lund,Mr Collingwood 457 | Marie Ramsden,Eddie Ramsden 458 | Marion Yeats,Eddie Yeats 459 | Mark Kenworthy,Jane Kenworthy 460 | Marsha Clifton,Neil Clifton 461 | Martha Fraser,Gordon Fraser 462 | Martha Longhurst,Percy Longhurst 463 | Martin Platt,Gail Tilsley 464 | Martin Robinson,1 wife 465 | Mary Bell,Ron Bell 466 | Mary Cole,Norris Cole 467 | Mary Docherty,Jon Lindsay 468 | Mary Handforth,George Handforth 469 | Mary Jackson,Fred Jackson 470 | Mary McKenna,Bernard McKenna 471 | Matilda Hench,Sam Hench 472 | Matt Ramsden,Charlie Ramsden|Charlie Johnson 473 | Maud Grimes,Wilfred Grimes 474 | Maureen Hicks,Harry Hicks 475 | Maureen Tully,Brian Tully 476 | Maureen Webb,Johnny Webb 477 | Maureen Webster,Frank Naylor 478 | Maurice Jones,Carol Jones 479 | Maurice Preston,Shirley Preston 480 | Mavis (Episode 26),Tom |Tom 481 | Mavis Wilton,Derek Wilton 482 | Maxine Peacock,Ashley Peacock 483 | May Hardman,George Hardman 484 | May Radfield,Duncan Radfield 485 | May Schofield,Jim Schofield |Jim Schofield 486 | Maya Desai,Sanjeet Desai 487 | Maya Sharma,Walid Aziz 488 | Megan Hopkins,Cledwin Hopkins 489 | Mel Bailey,A wife 490 | Mena Parekh,Suresh Parekh 491 | Michael Rodwell,Susan Meldrum 492 | Michelle Connor,Steve McDonald 493 | Mike Baldwin,Anne Woodley 494 | Mike Richardson,Lilly Richardson 495 | Mike Scott,Laura Scott 496 | Minnie Caldwell,Armistead Caldwell 497 | Moira Maxwell,Robert Maxwell 498 | Moira Pollock,Stuart Pollock 499 | Moira Wood,Harry Wood|Harold Wood 500 | Molly Dobbs,Tyrone Dobbs 501 | Mr Arnthorpe,Mrs Arnthorpe 502 | Mr Birtles,Mrs Birtles 503 | Mr Bradbury,Mrs Bradbury 504 | Mr Brennan (Episode 9717),Wife 505 | Mr Bright,Freda Bright 506 | Mr Burrows,Mrs Burrows 507 | Mr Collingwood,Marian Lund 508 | Mr Denelly,Mrs Denelly 509 | Mr Fearns,Brenda Fearns 510 | Mr Glegg,A wife 511 | Mr Linkwater,Mrs Linkwater 512 | Mr Magill,Mrs Magill 513 | Mr Midgeley,Jenny Bradley 514 | Mr Murdoch,Mrs Murdoch 515 | Mr Powell,Unnamed wife 516 | Mr Shaw (1991 character),Mrs Shaw |Mrs Shaw 517 | Mr Stark,Mrs Stark 518 | Mr Withers,Mrs Withers 519 | Mr. Armstrong,Mrs. Armstrong 520 | Mrs Andrews,A husband 521 | Mrs Armitage,a husband 522 | Mrs Arnthorpe,Mr Arnthorpe 523 | Mrs Birtles,Mr Birtles 524 | Mrs Bolan,A husband 525 | Mrs Bradbury,Mr Bradbury 526 | Mrs Burrows,Mr Burrows 527 | Mrs Chadwick (1990 character),Bob Chadwick |Bob Chadwick 528 | Mrs Denelly,Mr Denelly 529 | Mrs Dewhurst,John Dewhurst 530 | Mrs Ellis (1991 character),Frank Ellis 531 | Mrs Fletcher (1982 character),Arthur Fletcher 532 | Mrs Hargreaves,Norman Hargreaves 533 | Mrs Hodgkinson,Sidney Hodgkinson 534 | Mrs Linkwater,Mr Linkwater 535 | Mrs Magill,Mr Magill 536 | Mrs Maxwell-Glover,Brian Maxwell-Glover 537 | Mrs Murdoch,Mr Murdoch 538 | Mrs Parsons,Phil Parsons 539 | Mrs Piper,Mr Piper 540 | Mrs Robertson,John Robertson 541 | Mrs Scanlan,1 husband 542 | Mrs Shaw (1991 character),Mr Shaw |Mr Shaw 543 | Mrs Shaw (Episode 1179),George Shaw 544 | Mrs Stark,Mr Stark 545 | Mrs Tapper,a husband 546 | Mrs Thornley,John Thornley 547 | Mrs Toft,Mr Toft 548 | Mrs Withers,Mr Withers 549 | Mrs Wright,Jack Wright 550 | Mrs. Armstrong,Mr. Armstrong 551 | Mrs. Bannister,George Bannister 552 | Mrs. Bolton,Norman Bolton 553 | Mrs. Cleghorn,Harold Cleghorn 554 | Mrs. Conroy,a husband 555 | Mrs. Lambert,Tim Lambert 556 | Mrs. Shaw,Mr. Shaw 557 | Mrs. Stone,a husband 558 | Muriel Fielding,Bill Fielding 559 | Muriel Graham,Jimmy Graham 560 | Myra (Episode 2085),Reg |Reg 561 | Myra Booth,Jerry Booth 562 | Nancy Leathers,George Leathers 563 | Nancy Tinker,Bill 564 | Natalie Barnes,Nick Horrocks 565 | Nathaniel Lumley,Bertha Lumley 566 | Neil Beckett,Andrea Beckett 567 | Neil Clifton,Marsha Clifton 568 | Neil Crossley,Sheila Birtles 569 | Neil Mitchell,Denise Osbourne 570 | Nellie Harvey,Arthur Harvey 571 | Neville (2008 character),Barbara |Barbara 572 | Nick Horrocks,Natalie Barnes|Natalie Brownlow 573 | Nick Neeson,Wendy Neeson 574 | Nick Tilsley,Leanne Battersby 575 | Nigel Warner,Nessa Warner 576 | Nina Mandal,Prem Mandal 577 | Norah Seddon,Charles Seddon 578 | Norah Tanner,Arnold Tanner 579 | Norma Gee,Harry Gee 580 | Norman Lindley,Florrie Lindley 581 | Norman Pearson,Beattie Pearson|Beattie Tatlock 582 | Norris Cole,Myrtle Cole|Myrtle Hargreaves 583 | Olive Turner,Nobby Clarke|Stanley Clarke 584 | Ossie Oswald,Doris 585 | Owen Armstrong,Linda Hancock 586 | P.C. Betts,Mrs. Betts 587 | Pablo Duarte,Maria Connor 588 | Pam Hobsworth,Mr Hobsworth 589 | Pam Middleton,Clive Middleton 590 | Pat Phelan,Valerie Phelan 591 | Patricia Hillman,Richard Hillman 592 | Paul Connor,Carla Connor|Carla Donovan 593 | Paul Kershaw,Lesley Kershaw 594 | Paul Reece,Margaret Reece 595 | Paul Rigby,Stella Rigby 596 | Paul Seddon,Suzanne Seddon 597 | Paula Clegg,Ronnie Clegg 598 | Paula Martin,Tim 599 | Pauline Jarvis,Harry Jarvis 600 | Pauline Lofthouse,Dave Lofthouse 601 | Peggy Phillips,Clive Phillips 602 | Penny King,Preston King 603 | Peter Barlow,Jessica Midgeley 604 | Peter Ingram,Jackie Ingram 605 | Phil Jennings,Valerie Jennings 606 | Philip Barrett,Jill Barrett 607 | Philip Brookes,Sarah Brookes 608 | Phyllis Gregory,Bill Gregory 609 | Phyllis Pearce,Harold Pearce 610 | Police Officer (Episode 8585),Wife 611 | Polly Ogden,Trevor Ogden 612 | Prem Mandal,Nina Mandal 613 | Preston King,Penny King 614 | Rachel (Foster parent),Frank |Frank 615 | Rachel Healy,Nikolai Frankowicz 616 | Ralph Dobson,Enid Dobson 617 | Rana Habeeb,Zeedan Nazir 618 | Randolph Taylor,Brenda Taylor 619 | Ranjiv Alahan,Urmila Alahan 620 | Raquel Watts,Curly Watts|Norman Watts 621 | Raveena Bhatia,Harish Bhatia 622 | Ray Connell,Claire Connell 623 | Ray Griffiths,A wife 624 | Ray Langton,Deirdre Hunt 625 | Ray Sykes,Evelyn Sykes 626 | Ray Thorpe,a wife 627 | Rebecca Hopkins,Jerry Hopkins 628 | Reg (Episode 2085),Myra |Myra 629 | Reg Ellis,Wife 630 | Reg Holdsworth,Veronica Holdsworth|Veronica Hardback 631 | Renee Dodds,Archie Dodds 632 | Renee Roberts,Alf Roberts 633 | Richard Hillman,Marion Hillman 634 | Richie O'Driscoll,Julia O'Driscoll 635 | Rick Neelan,a wife 636 | Rita Tanner,Harry Bates
Len Fairclough
Ted Sullivan
Dennis Tanner 637 | Ritchie Fitzgerald,Samantha Failsworth 638 | Rob White,Janet White 639 | Robert Lowther,Joan Lowther 640 | Robert Maxwell,Moira Maxwell 641 | Robert Preston,Tracy Barlow 642 | Robert Weston,Linda Weston 643 | Robin Mellor,Diane Mellor 644 | Ron Bell,Mary Bell 645 | Ron Cooke,Maggie Clegg 646 | Ronnie Clayton,Jimmy Clayton 647 | Ronnie Stubbs,Sandra Stubbs 648 | Ross Watson,Cindy Watson 649 | Roy Cropper,Tracy Barlow 650 | Roy Johnson,Lynn Johnson 651 | Roy Thornley,Doreen Thornley 652 | Sabeen Habeeb,Imran Habeeb 653 | Saira Habeeb,Hassan Habeeb 654 | Sally Metcalfe,Kevin Webster 655 | Sally Robson,Terry Robson 656 | Sam Foster,Anne Foster 657 | Sam Hench,Matilda Hench 658 | Sam Leach,May Leach 659 | Samantha Failsworth,Ritchie Fitzgerald 660 | Samir Rachid,Deirdre Barlow 661 | Sandra Arden,Tim Arden 662 | Sandra Burrows,Danny Burrows 663 | Sandra Hesketh,Keith Hesketh 664 | Sandra Stubbs,Ronnie Stubbs 665 | Sarah Brookes,Philip Brookes 666 | Sarah Platt,Jason Grimshaw 667 | Sean Regan,Concepta Hewitt 668 | Sean Riley,Shelagh Riley 669 | Sean Skinner,Lynne Skinner 670 | Sharif Nazir,Yasmeen Nazir 671 | Sharon Bentley,Ian Bentley 672 | Sharon Butterlee,Ed 673 | Sheila Crossley,Neil Crossley 674 | Shelagh Riley,Sean Riley 675 | Shelley Unwin,Peter Barlow 676 | Shirley Preston,Maurice Preston 677 | Shopkeeper (Episode 2971),Alice 678 | Sidney Burgess,Edie Burgess 679 | Sinead Osbourne,Daniel Osbourne 680 | Sir Hubert Ridley,Margaret Newton 681 | Sonia Rahman,Tariq Rahman 682 | Stan Ogden,Hilda Ogden|Hilda Crabtree 683 | Stan Whitmore,Wife 684 | Stanley Fairclough,Liz Brocklebank 685 | Stella Price,Karl Munro 686 | Stella Rigby,Paul Rigby 687 | Steph Barnes,Des Barnes 688 | Steve McDonald,Victoria Arden 689 | Steve Tanner,Le Lan Tanner|Le Lan 690 | Stuart Pollock,Moira Pollock 691 | Sue Jackson,Colin Jackson 692 | Sue Jeffers,Geoff Jeffers 693 | Sunita Alahan,Dev Alahan 694 | Suresh Parekh,Mena Parekh 695 | Susan Barlow,Mike Baldwin 696 | Susan Denton,David Denton 697 | Susan Meldrum,Michael Rodwell 698 | Suzanne Seddon,Paul Seddon 699 | Suzie Birchall,Terry Goodwin 700 | Sylvia Goodwin,St. John Cropper 701 | Sylvia Ramsden,Matt Ramsden 702 | Sylvia Snape,Bernard Snape 703 | Talisa Grady,1 husband 704 | Tanya (Episode 9467),John |John 705 | Ted Ashley,a wife 706 | Ted Bates,Alice 707 | Ted Farrell,A wife 708 | Ted Loftus,Freda Loftus 709 | Ted Page,James 710 | Ted Sullivan,Doris Sullivan 711 | Teresa Bryant,Jerry Morton 712 | Terry Conway,A wife 713 | Terry Duckworth,Lisa Horton 714 | Terry Goodwin,Suzie Birchall 715 | Tim Arden,Sandra Arden|Sandra Shaw 716 | Tim Marsden,Jemma Marsden 717 | Tim Metcalfe,Sally Webster 718 | Toby Chapman,Toyah Battersby 719 | Tom (Episode 26),Mavis |Mavis 720 | Tom Casey,Jean Casey 721 | Tom Finlay,A wife 722 | Tom Hopwood,Margaret 723 | Tom Ridley,a husband 724 | Tom Riley,Margaret Riley 725 | Tom Russell (1976 character),Cath 726 | Tom Schofield (Great-nephew of Ena Sharples),Faye-Marie Schofield 727 | Tommy Harris,Angela Harris|Angela Appleyard 728 | Toni Griffiths,Mike Griffiths 729 | Toni Melton,Chris Melton 730 | Tony Gordon,Lindsey Gordon 731 | Toyah Battersby,Toby Chapman 732 | Tracy McDonald,Robert Preston 733 | Trevor Ogden,Polly Ogden|Pauline Watson 734 | Trevor Parkin,A wife 735 | Tricia Armstrong,Carl Armstrong 736 | Tyrone Dobbs,Molly Compton 737 | Urmila Alahan,Ranjiv Alahan 738 | Valerie Barlow,Ken Barlow 739 | Valerie Jennings,Phil Jennings 740 | Valerie Phelan,Pat Phelan 741 | Vera Duckworth,Jack Duckworth 742 | Vera Hopkins,Idris Hopkins 743 | Vera Lomax,Bob Lomax 744 | Verity Gibson,Iain Gibson 745 | Vernon Tomlin,Liz McDonald 746 | Veronica Holdsworth,Reg Holdsworth 747 | Vicki (Episode 1281),1 husband 748 | Vicky McDonald,Steve McDonald 749 | Victor Pendlebury,Yvonne Pendlebury 750 | Vince (Episodes 8688/9),Marlene 751 | Vinnie Powers,Janet Powers 752 | Viv Baldwin,Harry Baldwin 753 | Vivian Barford,Desmond Barford 754 | Walid Aziz,Maya Sharma 755 | Wally Bannister,Joan Bannister 756 | Wally Tanner,Amy Tanner 757 | Walter Greenhalgh,Dot Greenhalgh|Dot Todd 758 | Wanda Brinsley,Dick Brinsley|number of appearances = 7 759 | Wendy Neeson,Nick Neeson 760 | Wendy Nightingale,Roger Nightingale 761 | Wendy Papadopoulos,Christos Papadopoulos 762 | Winnie Dyson,Norman Dyson 763 | Woman (Episode 6587),Man |Man 764 | Xin Proctor,Graeme Proctor 765 | Yasmeen Nazir,Sharif Nazir 766 | Yvonne Pendlebury,Victor Pendlebury 767 | Zeedan Nazir,Rana Habeeb 768 | -------------------------------------------------------------------------------- /projects/spouse_converter.py: -------------------------------------------------------------------------------- 1 | import requests 2 | import urllib.request 3 | import json 4 | import re 5 | from main import JSON_FILE 6 | 7 | 8 | if __name__ == "__main__": 9 | 10 | csv = "" 11 | 12 | with open(JSON_FILE) as data_file: 13 | data = json.load(data_file) 14 | for v in data.items(): 15 | try: 16 | if isinstance(v[1]['spouse(s)'], list): 17 | print ("a list!") 18 | for itemsv in v[1]['spouse(s)']: 19 | if v[1]['spouse(s)'] != "": 20 | csv = csv + v[0] + "," + itemsv + "\n" 21 | print("writing the following line") 22 | print(v[0] + "," + v[1]['spouse(s)'] + "\n") 23 | else: 24 | print ("not a list") 25 | if v[1]['spouse(s)'] != "": 26 | print("writing the following line") 27 | print(v[0] + "," + v[1]['spouse(s)'] + "\n") 28 | csv = csv + v[0] + "," + v[1]['spouse(s)'] + "\n" 29 | 30 | 31 | except: 32 | print("Doing nothing") 33 | 34 | print(csv) 35 | f = open("corrie.csv", 'w') 36 | f.write(csv) -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | # Fandom scraper # 2 | This repository provides a Python script for scraping infoboxes from the Coronation Street fandom.com site to a local json file. It can be adapted to any fandom site by changing the value of `FANDOM_SITE` in `main.py`. 3 | 4 | [Related blog post](https://davidsherlock.co.uk/extracting-data-from-fandom/) --------------------------------------------------------------------------------