from bs4 import BeautifulSoup a = """ King's Recruit 1 Caravan Driver Ragni Outskirts Wynn Long Normal 6 35 Enzan's Brother 1 Enzan Ragni Wynn Short Normal 0 80 Poisoning the Pest 2 Farmer Cevalus Ragni Wynn Medium Normal 25 145 Cook Assistant 4 The Cook Ragni Wynn Short Normal 28 200 Tunnel Trouble 5 Captain Fenor Detlas Wynn Long Normal 55 300 The Sewers of Ragni 5 Jenprest Decrepit Sewers Wynn Medium Dungeon 0 500 Infested Plants 6 Ope Nivla Woods Wynn Short Normal 5 270 Underwater 8 Omango Coastal Trail Wynn Medium Normal 32 550 Elemental Exercise 10 Ragon Nivla Woods Wynn Medium Normal 64 850 Mushroom Man 12 Yahya Nivla Woods Wynn Medium Normal 128 1000 Creeper Infiltration 14 Thomas Pigmen's Ravines Wynn Medium Normal 64 1400 Arachnids' Ascent 14 Captain Enduyn Infested Pit Wynn Medium Dungeon 0 850 Deja Vu 14 Asher Time Valley Wynn Medium Normal 28 1300 Potion Making 15 The Assistant Essren's Hut Wynn Medium Normal 0 1600 Maltics Well 18 Rynend Maltic Wynn Short Normal 0 2000 Grave Digger 20 Sayleros Detlas Wynn Medium Normal 128 3300 Macabre Masquerade Hallowynn 2014 21 Mask Salesman Near Mount Wynn Wynn Short Event 192 10000 Studying the Corrupt 21 Pottur Lost Sanctuary Wynn Medium Dungeon 0 3600 Pit of the Dead 23 Merloni Pit of the Dead Wynn Short Normal 0 2675 Cluck Cluck 23 Nohno Rooster Island Wynn Short Normal 0 2800 Dwelling Walls 24 Leucsaa Nemract Wynn Medium Normal 128 3650 The Dark Descent 24 General Graken Underworld Crypt Wynn Long Dungeon 0 2400 Recover the Past 25 Dr. Picard Tower of Amnesia Wynn Long Normal 0 6000 Lost Tower 26 Laen Nemract Wynn Short Normal 64 6500 The Corrupted Village 26 Orikal Ternaves Wynn Long Normal 136 4800 The Mercenary 28 Amerigo Nemract Wynn Medium Normal 384 10000 Misadventure on the Sea 28 Barman Nemract Wynn Long Normal 0 +8500 Craftmas Chaos 30 Tom Selchar Ocean Long Event 640 12000 Green Gloop 31 Eluzterp Slime Cave Wynn Medium Normal 192 9500 A Sandy Scandal 32 Almuj Bank Guard Almuj Wynn Long Normal 128 22000 Meaningful Holiday 33 Haily Almuj Wynn Long Event 128 15000 Kingdom of Sand 33 Lanu Sand-Swept Tomb Wynn Long Dungeon 192 10000 Stable Story 34 Enkser Ternaves Wynn Short Normal 0 9000 Tribal Aggression 35 Caras Mesa Wynn Medium Normal 0 24000 WynnExcavation Site A 35 Excavator Vade Desert Wynn Medium Normal 0 15000 Wrath of the Mummy 36 Ormrod Almuj Wynn Medium Normal 128 16600 Canyon Condor 38 Svin Rymek Wynn Medium Normal 640 21000 Pirate's Trove 39 Damiral Llevigar Port Gavel Medium Normal 168 26000 Ice Nations 40 Adigard Icy Islands Wynn Medium Normal 256 25000 Tower of Ascension 40 Ankou Tower of Ascension Wynn Long Special 32768 925000 Max (see Tips) Heart of Llevigar 41 Zenam Llevigar Gavel Long Normal 224 24500 Star Thief 42 Agent Llevigar Plains Gavel Medium Normal 256 40000 Clearing the Camps 42 Captain Kymer Llevigar Gavel Short Normal 300 23000 Underice 43 Fredris Nesaak Wynn Medium Normal 128 34000 Fate of the Fallen 43 Telvu Ice Barrows Wynn Long Dungeon 0 20000 Green Skinned Trouble 44 Piere Llevigar Plains Gavel Medium Normal 512 38000 Bob's Lost Soul 45 Tarod Nesaak Wynn Long Normal 0 55000 Wynn Excavation Site B 46 Excavator Lykron Below path towards Haunted Mansion Wynn Medium Normal 1536 50000 Frost Bite 48 Eppo Ice Canyon Wynn Long Normal 640 61000 An Iron Heart Part I 49 Duvale Bucie Gavel Medium Normal 128 42000 Rise of the Quartron 49 Manager Nasea Karoc Quarry Gavel Long Normal 1408 75000 The House of Twain 49 Twendle The House of Twain Wynn Short Normal 4096 45000 A Grave Mistake 50 Alem The House of Twain Wynn Medium Event 640 66666 The Maiden Tower 51 Sherk Olux Swamp Gavel Medium Normal 512 77500 Jungle Fever 52 Worid Jungle Wynn Medium Normal 4096 86250 Crop Failure 52 Anast Olux Gavel Medium Normal 640 57500 Corrupted Betrayal 52 Slykaar Undergrowth Ruins Wynn Long Dungeon 1024 87725 Master Piece 53 Caissop Olux Swamp Gavel Medium Normal 0 85000 Death Whistle 53 Voer Olux Swamp Gavel Medium Normal 640 95000 The Shadow of the Beast 54 Dereg Olux Swamp Gavel Long Normal 512 140000 The Worm Holes 54 Malo Olux Swamp Gavel Medium Normal 768 100000 WynnExcavation Site C 55 Excavator Placardus Volcanic Island Ocean Long Normal 0 150000 Zhight Island 55 Zhight Zhight Island Ocean Medium Normal 0 95000 The Passage 57 Wirt Troms Wynn Short Normal 256 140000 An Iron Heart Part II 58 Detective Hart Olux Gavel Medium Normal 768 / 512 160000 The Order of the Grook 59 Seasum Mage Island Ocean Long Normal 0 242500 Beneath the Depths 60 Javier Pirate Cove Ocean Medium Normal 1 185000 Redbeard's Booty 61 Marston Galleon's Graveyard Ocean Medium Dungeon 0 180000 Reclaiming the House 61 Ahmas Olux Swamp Gavel Medium Normal 2048 200000 Lost in the Jungle 62 Gracen Jungle Village Wynn Medium Normal 0 225000 Taproot 62 Hazel Dark Forest Gavel Long Normal 0 275000 Out of My Mind 63 Prentiss Troms Wynn Medium Normal 1024 300000 A Fighting Species 64 Darnes Pre-Light Forest Gavel Medium Normal 1856 267500 The Headless Hunt 64 Referick Dark Forest Gavel Long Normal 1024 355000 Lost Royalty 65 Yavlis Troms Wynn Medium Normal 2048 290000 Lost Soles 66 Ferndor Dernel Jungle Wynn Long Normal 1152 352000 From the Mountains 67 Anrod Pre-Light Forest Gavel Long Normal 1024 175000 Memory Paranoia 67 Atisun Caritat Mansion Gavel Long Normal 1536 375000 Temple of Legends 68 Kelight Temple of the Legends Wynn Long Normal 0 550000 Grand Youth 69 Monte Dernel Jungle Wynn Medium Normal 1024 425000 Lazarus Pit 69 Burtur Gelibord Gavel Long Normal 1024 500000 Haven Antiquity 70 Cinfras Dead Island Ocean Medium Normal 1048 300000 WynnExcavation Site D 70 Royal Advisor Carlos Troms Wynn Long Normal 16384 600000 Shattered Minds 70 Likeru Efilim Gavel Long Normal 2560 290000 Finding The Light 71 Guardian of The Forest Light Forest Gavel Long Normal 0 675000 Forbidden Prison 72 Prison Guard Forbidden Prison Gavel Medium Normal 0 550000 Eye of the Storm 72 Arwes Lexdale Gavel Long Normal 6106 725000 Hollow Sirene 73 Laloire Kander Forest Gavel Long Normal 1024 640000 Troubled Tribesmen 73 Ka L'argwit Dernel Jungle Wynn Medium Normal 2048 500000 Acquiring Credentials 74 Doan Letvus Airbase Gavel Long Normal 768 300000 Reincarnation 74 Batelu Bob's Tomb Wynn Long Normal 0 750000 Murder Mystery 74 Captain Lorias Cinfras Suburbs Gavel Medium Normal 3072 350000 The Realm of Light 74 Aluxander Realm of Light Gavel Long Normal 4096 750000 Flight in Distress 75 Passenger Controllant Letvus Airbase Gavel Long Normal 0 750000 The Ultimate Weapon 75 Dodegar Bandysnoot Light Forest Gavel Medium Normal 0 450000 The Bigger Picture 76 Psilo Mushroom Village Gavel Medium Normal 1920 500000 Aldorei's Secret Part I 76 Elrund The entrance of Aldorei Valley Gavel Long Normal 8192 / 0 512500 Purple and Blue 77 Korun Cinfras County Gavel Long Normal 2048 500000 The Hunger of Gerts Part 1 77 Cikal Cinfras County Gavel Long Normal 4864 675000 Aldorei's Secret Part II 78 Legolus Aldorei Town Gavel Long Normal 10240 / 0 450000 The Hunger of Gerts Part 2 78 Gerten Chief Lobo Cinfras County Gavel Long Normal 0 730000 Fallen Delivery 79 Bricot Cinfras County Gavel Long Normal 2048 1300000 ??? 80 ??? Gavel Gavel Medium Normal 6144 1400000 From the Bottom 80 Nakoba Thanos Bazaar Gavel Long Normal 4096 700000 General's Orders 80 Private Tylas Canyon of the Lost Gavel Long Normal 0 1300000 The Qira Hive 80 Yansur The Qira Hive Gavel Long Special 0 6250000 Max (see Tips) The Thanos Vaults 81 Dolem Thanos Gavel Medium Normal 4096 775000 The Belly of the Beast 82 King Burtan Thanos/Ozoth's Spire Gavel Medium Normal 2048 1250000 A Marauder's Dues 83 Norsten Canyon of the Lost Gavel Medium Normal 8192 1375000 The Envoy Part I 83 Olivin Selchar, Corkus Province Ocean Long Normal 9152 1750000 The Canyon Guides 84 Gana The entrance of Bantisu Air Temple Gavel Medium Normal 2048 1450000 The Canary Calls 85 Grenot Thesead mines Gavel Medium Normal 2048 1575000 The Lost 85 Dejol Canyon of the Lost Gavel Medium Normal 2048 1575000 Cowfusion 86 Ranol Canyon of the Lost Gavel Long Normal 4096 2300000 Desperate Metal 86 Phinas Corkus Shore Corkus Medium Normal 2048 1580000 Beyond the Grave 87 Irlok Canyon of the Lost Gavel Medium Normal 8192 2100000 Mixed Feelings 87 Javen Corkus Docks Corkus Long Normal 2048 1750000 The Hidden City 88 Narder Thesead Gavel Long Normal 4096 2700000 The Envoy Part II 89 Maxie Corkus City Corkus Long Dungeon 0 3050000 Enter the Dojo 89 Sensei Miyagi Sakura Dojo Gavel Long Normal 0 2900000 Fantastic Voyage 90 Relend Jofash Docks Ocean Long Normal 6144 3100000 Dwarves and Doguns Part I 91 Lozeg Rodoroc Gavel Long Normal 0 3300000 Dwarves and Doguns Part II 92 Dogun Chieftain Dogun's Retreat Gavel Long Normal 0 3500000 Dwarves and Doguns Part III 93 Korzim Molten Heights Gavel Long Normal 0 4000000 Dwarves and Doguns Part IV 94 Korzim Molten Heights Gavel Long Normal 20480 6000000 One Thousand Meters Under 95 Help Wanted Ahmsord Gavel Long Normal 2048 5500000 Recipe For Disaster 96 Chef Hamsey Ahmsord Gavel Medium Normal 4096 4200000 The Fortuneteller 97 Jill Kandon-Beda Gavel Medium Normal 0 3900000 Royal Trials 98 Skyraider Guard Sky Islands Gavel Long Normal 4096 7270000 A Journey Beyond 100 Elphaba Detlas Wynn Long Normal 12288 6000000 The Olmic Rune 100 Abandoned Drill Olmic Ruined City Silent Expanse Medium Normal 0 5800000 A Journey Further 101 Aledar Lutho Silent Expanse Long Dungeon 20480 7500000 Point of No Return 102 Lutho Citizen Lutho Silent Expanse Long Normal 8192 7000000 A Hunter's Calling 103 Portal to Dern Silent Expanse Long Normal 0 10008000 """ h = BeautifulSoup(a, 'html.parser') tr = h.find_all("tr") for t in tr: tds = t.find_all("td") print("{\"level\": %s, \"name\": \"%s\", \"url\": \"https://wynncraft.gamepedia.com%s\"}," % (tds[1].text.replace("\n", ""), tds[0].text.replace("\n", ""), tds[0].a["href"].replace("\n", "")))