File size: 85,283 Bytes
8bd9f2b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
{
  "nbformat": 4,
  "nbformat_minor": 0,
  "metadata": {
    "colab": {
      "provenance": []
    },
    "kernelspec": {
      "name": "python3",
      "display_name": "Python 3"
    },
    "language_info": {
      "name": "python"
    }
  },
  "cells": [
    {
      "cell_type": "markdown",
      "source": [
        " # Create the dataset for the chatbox about League of Legends Lore\n",
        " Author: **HOANG Caroline**\n",
        "\n",
        " The notebook is setup and runnable for Google Collab"
      ],
      "metadata": {
        "id": "AUdgpvdZDa2l"
      }
    },
    {
      "cell_type": "markdown",
      "source": [
        "## 1. Setup"
      ],
      "metadata": {
        "id": "ZMtrx1lED6_D"
      }
    },
    {
      "cell_type": "markdown",
      "source": [
        "Chrome Installation"
      ],
      "metadata": {
        "id": "KtlLmE3cD_hS"
      }
    },
    {
      "cell_type": "code",
      "execution_count": 1,
      "metadata": {
        "id": "bULR-49jDSDU",
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "outputId": "232a6f85-099b-4cbd-e053-002dc700c836"
      },
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "Hit:1 http://archive.ubuntu.com/ubuntu jammy InRelease\n",
            "Get:2 http://archive.ubuntu.com/ubuntu jammy-updates InRelease [128 kB]\n",
            "Get:3 http://archive.ubuntu.com/ubuntu jammy-backports InRelease [127 kB]\n",
            "Get:4 http://security.ubuntu.com/ubuntu jammy-security InRelease [129 kB]\n",
            "Get:5 https://r2u.stat.illinois.edu/ubuntu jammy InRelease [6,555 B]\n",
            "Get:6 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64  InRelease [1,581 B]\n",
            "Get:7 https://cloud.r-project.org/bin/linux/ubuntu jammy-cran40/ InRelease [3,632 B]\n",
            "Hit:8 https://ppa.launchpadcontent.net/deadsnakes/ppa/ubuntu jammy InRelease\n",
            "Hit:9 https://ppa.launchpadcontent.net/graphics-drivers/ppa/ubuntu jammy InRelease\n",
            "Hit:10 https://ppa.launchpadcontent.net/ubuntugis/ppa/ubuntu jammy InRelease\n",
            "Get:11 http://archive.ubuntu.com/ubuntu jammy-updates/restricted amd64 Packages [3,830 kB]\n",
            "Get:12 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages [2,957 kB]\n",
            "Get:13 http://archive.ubuntu.com/ubuntu jammy-updates/universe amd64 Packages [1,533 kB]\n",
            "Get:14 https://r2u.stat.illinois.edu/ubuntu jammy/main amd64 Packages [2,664 kB]\n",
            "Get:15 https://r2u.stat.illinois.edu/ubuntu jammy/main all Packages [8,708 kB]\n",
            "Get:16 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64  Packages [1,321 kB]\n",
            "Get:17 http://security.ubuntu.com/ubuntu jammy-security/universe amd64 Packages [1,235 kB]\n",
            "Get:18 http://security.ubuntu.com/ubuntu jammy-security/restricted amd64 Packages [3,688 kB]\n",
            "Get:19 http://security.ubuntu.com/ubuntu jammy-security/main amd64 Packages [2,649 kB]\n",
            "Fetched 29.0 MB in 10s (2,897 kB/s)\n",
            "Reading package lists...\n",
            "W: Skipping acquire of configured file 'main/source/Sources' as repository 'https://r2u.stat.illinois.edu/ubuntu jammy InRelease' does not seem to provide it (sources.list entry misspelt?)\n",
            "Reading package lists... Done\n",
            "Building dependency tree... Done\n",
            "Reading state information... Done\n",
            "curl is already the newest version (7.81.0-1ubuntu1.20).\n",
            "unzip is already the newest version (6.0-26ubuntu3.2).\n",
            "wget is already the newest version (1.21.2-2ubuntu1.1).\n",
            "0 upgraded, 0 newly installed, 0 to remove and 30 not upgraded.\n",
            "--2025-02-28 19:43:10--  https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb\n",
            "Resolving dl.google.com (dl.google.com)... 142.251.167.136, 142.251.167.190, 142.251.167.93, ...\n",
            "Connecting to dl.google.com (dl.google.com)|142.251.167.136|:443... connected.\n",
            "HTTP request sent, awaiting response... 200 OK\n",
            "Length: 113752568 (108M) [application/x-debian-package]\n",
            "Saving to: ‘google-chrome-stable_current_amd64.deb’\n",
            "\n",
            "google-chrome-stabl 100%[===================>] 108.48M   247MB/s    in 0.4s    \n",
            "\n",
            "2025-02-28 19:43:12 (247 MB/s) - ‘google-chrome-stable_current_amd64.deb’ saved [113752568/113752568]\n",
            "\n",
            "Selecting previously unselected package google-chrome-stable.\n",
            "(Reading database ... 124947 files and directories currently installed.)\n",
            "Preparing to unpack google-chrome-stable_current_amd64.deb ...\n",
            "Unpacking google-chrome-stable (133.0.6943.141-1) ...\n",
            "\u001b[1mdpkg:\u001b[0m dependency problems prevent configuration of google-chrome-stable:\n",
            " google-chrome-stable depends on libvulkan1; however:\n",
            "  Package libvulkan1 is not installed.\n",
            "\n",
            "\u001b[1mdpkg:\u001b[0m error processing package google-chrome-stable (--install):\n",
            " dependency problems - leaving unconfigured\n",
            "Processing triggers for mailcap (3.70+nmu1ubuntu1) ...\n",
            "Processing triggers for man-db (2.10.2-1) ...\n",
            "Errors were encountered while processing:\n",
            " google-chrome-stable\n",
            "Reading package lists... Done\n",
            "Building dependency tree... Done\n",
            "Reading state information... Done\n",
            "Correcting dependencies... Done\n",
            "The following additional packages will be installed:\n",
            "  libvulkan1 mesa-vulkan-drivers\n",
            "The following NEW packages will be installed:\n",
            "  libvulkan1 mesa-vulkan-drivers\n",
            "0 upgraded, 2 newly installed, 0 to remove and 30 not upgraded.\n",
            "1 not fully installed or removed.\n",
            "Need to get 10.9 MB of archives.\n",
            "After this operation, 51.3 MB of additional disk space will be used.\n",
            "Get:1 http://archive.ubuntu.com/ubuntu jammy/main amd64 libvulkan1 amd64 1.3.204.1-2 [128 kB]\n",
            "Get:2 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 mesa-vulkan-drivers amd64 23.2.1-1ubuntu3.1~22.04.3 [10.7 MB]\n",
            "Fetched 10.9 MB in 1s (10.1 MB/s)\n",
            "Selecting previously unselected package libvulkan1:amd64.\n",
            "(Reading database ... 125064 files and directories currently installed.)\n",
            "Preparing to unpack .../libvulkan1_1.3.204.1-2_amd64.deb ...\n",
            "Unpacking libvulkan1:amd64 (1.3.204.1-2) ...\n",
            "Selecting previously unselected package mesa-vulkan-drivers:amd64.\n",
            "Preparing to unpack .../mesa-vulkan-drivers_23.2.1-1ubuntu3.1~22.04.3_amd64.deb ...\n",
            "Unpacking mesa-vulkan-drivers:amd64 (23.2.1-1ubuntu3.1~22.04.3) ...\n",
            "Setting up libvulkan1:amd64 (1.3.204.1-2) ...\n",
            "Setting up mesa-vulkan-drivers:amd64 (23.2.1-1ubuntu3.1~22.04.3) ...\n",
            "Setting up google-chrome-stable (133.0.6943.141-1) ...\n",
            "update-alternatives: using /usr/bin/google-chrome-stable to provide /usr/bin/x-www-browser (x-www-browser) in auto mode\n",
            "update-alternatives: using /usr/bin/google-chrome-stable to provide /usr/bin/gnome-www-browser (gnome-www-browser) in auto mode\n",
            "update-alternatives: using /usr/bin/google-chrome-stable to provide /usr/bin/google-chrome (google-chrome) in auto mode\n",
            "Processing triggers for libc-bin (2.35-0ubuntu3.8) ...\n",
            "/sbin/ldconfig.real: /usr/local/lib/libtbbmalloc_proxy.so.2 is not a symbolic link\n",
            "\n",
            "/sbin/ldconfig.real: /usr/local/lib/libtbbbind.so.3 is not a symbolic link\n",
            "\n",
            "/sbin/ldconfig.real: /usr/local/lib/libur_adapter_level_zero.so.0 is not a symbolic link\n",
            "\n",
            "/sbin/ldconfig.real: /usr/local/lib/libtbbbind_2_5.so.3 is not a symbolic link\n",
            "\n",
            "/sbin/ldconfig.real: /usr/local/lib/libtbbmalloc.so.2 is not a symbolic link\n",
            "\n",
            "/sbin/ldconfig.real: /usr/local/lib/libur_loader.so.0 is not a symbolic link\n",
            "\n",
            "/sbin/ldconfig.real: /usr/local/lib/libumf.so.0 is not a symbolic link\n",
            "\n",
            "/sbin/ldconfig.real: /usr/local/lib/libtbbbind_2_0.so.3 is not a symbolic link\n",
            "\n",
            "/sbin/ldconfig.real: /usr/local/lib/libhwloc.so.15 is not a symbolic link\n",
            "\n",
            "/sbin/ldconfig.real: /usr/local/lib/libtcm_debug.so.1 is not a symbolic link\n",
            "\n",
            "/sbin/ldconfig.real: /usr/local/lib/libur_adapter_opencl.so.0 is not a symbolic link\n",
            "\n",
            "/sbin/ldconfig.real: /usr/local/lib/libtbb.so.12 is not a symbolic link\n",
            "\n",
            "/sbin/ldconfig.real: /usr/local/lib/libtcm.so.1 is not a symbolic link\n",
            "\n",
            "Reading package lists... Done\n",
            "Building dependency tree... Done\n",
            "Reading state information... Done\n",
            "libasound2 is already the newest version (1.2.6.1-1ubuntu1).\n",
            "libasound2 set to manually installed.\n",
            "libxi6 is already the newest version (2:1.8-1build1).\n",
            "libxi6 set to manually installed.\n",
            "libxss1 is already the newest version (1:1.2.3-1build2).\n",
            "libxss1 set to manually installed.\n",
            "libnss3 is already the newest version (2:3.98-0ubuntu0.22.04.2).\n",
            "libnss3 set to manually installed.\n",
            "libx11-dev is already the newest version (2:1.7.5-1ubuntu0.3).\n",
            "libx11-dev set to manually installed.\n",
            "libx11-xcb1 is already the newest version (2:1.7.5-1ubuntu0.3).\n",
            "libx11-xcb1 set to manually installed.\n",
            "Suggested packages:\n",
            "  indicator-application\n",
            "The following NEW packages will be installed:\n",
            "  gconf-service gconf-service-backend gconf2-common libappindicator3-1 libdbus-glib-1-2\n",
            "  libdbusmenu-glib4 libdbusmenu-gtk3-4 libgconf-2-4 libglu1-mesa libxtst6\n",
            "0 upgraded, 10 newly installed, 0 to remove and 30 not upgraded.\n",
            "Need to get 1,184 kB of archives.\n",
            "After this operation, 9,107 kB of additional disk space will be used.\n",
            "Get:1 http://archive.ubuntu.com/ubuntu jammy/main amd64 libdbus-glib-1-2 amd64 0.112-2build1 [65.4 kB]\n",
            "Get:2 http://archive.ubuntu.com/ubuntu jammy/universe amd64 gconf2-common all 3.2.6-7ubuntu2 [698 kB]\n",
            "Get:3 http://archive.ubuntu.com/ubuntu jammy/universe amd64 libgconf-2-4 amd64 3.2.6-7ubuntu2 [86.0 kB]\n",
            "Get:4 http://archive.ubuntu.com/ubuntu jammy/universe amd64 gconf-service-backend amd64 3.2.6-7ubuntu2 [59.3 kB]\n",
            "Get:5 http://archive.ubuntu.com/ubuntu jammy/universe amd64 gconf-service amd64 3.2.6-7ubuntu2 [17.4 kB]\n",
            "Get:6 http://archive.ubuntu.com/ubuntu jammy/main amd64 libdbusmenu-glib4 amd64 16.04.1+18.10.20180917-0ubuntu8 [45.4 kB]\n",
            "Get:7 http://archive.ubuntu.com/ubuntu jammy/main amd64 libdbusmenu-gtk3-4 amd64 16.04.1+18.10.20180917-0ubuntu8 [31.0 kB]\n",
            "Get:8 http://archive.ubuntu.com/ubuntu jammy/universe amd64 libappindicator3-1 amd64 12.10.1+20.10.20200706.1-0ubuntu1 [23.2 kB]\n",
            "Get:9 http://archive.ubuntu.com/ubuntu jammy/main amd64 libxtst6 amd64 2:1.2.3-1build4 [13.4 kB]\n",
            "Get:10 http://archive.ubuntu.com/ubuntu jammy/main amd64 libglu1-mesa amd64 9.0.2-1 [145 kB]\n",
            "Fetched 1,184 kB in 1s (1,549 kB/s)\n",
            "Selecting previously unselected package libdbus-glib-1-2:amd64.\n",
            "(Reading database ... 125102 files and directories currently installed.)\n",
            "Preparing to unpack .../0-libdbus-glib-1-2_0.112-2build1_amd64.deb ...\n",
            "Unpacking libdbus-glib-1-2:amd64 (0.112-2build1) ...\n",
            "Selecting previously unselected package gconf2-common.\n",
            "Preparing to unpack .../1-gconf2-common_3.2.6-7ubuntu2_all.deb ...\n",
            "Unpacking gconf2-common (3.2.6-7ubuntu2) ...\n",
            "Selecting previously unselected package libgconf-2-4:amd64.\n",
            "Preparing to unpack .../2-libgconf-2-4_3.2.6-7ubuntu2_amd64.deb ...\n",
            "Unpacking libgconf-2-4:amd64 (3.2.6-7ubuntu2) ...\n",
            "Selecting previously unselected package gconf-service-backend.\n",
            "Preparing to unpack .../3-gconf-service-backend_3.2.6-7ubuntu2_amd64.deb ...\n",
            "Unpacking gconf-service-backend (3.2.6-7ubuntu2) ...\n",
            "Selecting previously unselected package gconf-service.\n",
            "Preparing to unpack .../4-gconf-service_3.2.6-7ubuntu2_amd64.deb ...\n",
            "Unpacking gconf-service (3.2.6-7ubuntu2) ...\n",
            "Selecting previously unselected package libdbusmenu-glib4:amd64.\n",
            "Preparing to unpack .../5-libdbusmenu-glib4_16.04.1+18.10.20180917-0ubuntu8_amd64.deb ...\n",
            "Unpacking libdbusmenu-glib4:amd64 (16.04.1+18.10.20180917-0ubuntu8) ...\n",
            "Selecting previously unselected package libdbusmenu-gtk3-4:amd64.\n",
            "Preparing to unpack .../6-libdbusmenu-gtk3-4_16.04.1+18.10.20180917-0ubuntu8_amd64.deb ...\n",
            "Unpacking libdbusmenu-gtk3-4:amd64 (16.04.1+18.10.20180917-0ubuntu8) ...\n",
            "Selecting previously unselected package libappindicator3-1.\n",
            "Preparing to unpack .../7-libappindicator3-1_12.10.1+20.10.20200706.1-0ubuntu1_amd64.deb ...\n",
            "Unpacking libappindicator3-1 (12.10.1+20.10.20200706.1-0ubuntu1) ...\n",
            "Selecting previously unselected package libxtst6:amd64.\n",
            "Preparing to unpack .../8-libxtst6_2%3a1.2.3-1build4_amd64.deb ...\n",
            "Unpacking libxtst6:amd64 (2:1.2.3-1build4) ...\n",
            "Selecting previously unselected package libglu1-mesa:amd64.\n",
            "Preparing to unpack .../9-libglu1-mesa_9.0.2-1_amd64.deb ...\n",
            "Unpacking libglu1-mesa:amd64 (9.0.2-1) ...\n",
            "Setting up libxtst6:amd64 (2:1.2.3-1build4) ...\n",
            "Setting up libdbusmenu-glib4:amd64 (16.04.1+18.10.20180917-0ubuntu8) ...\n",
            "Setting up gconf2-common (3.2.6-7ubuntu2) ...\n",
            "\n",
            "Creating config file /etc/gconf/2/path with new version\n",
            "Setting up libdbus-glib-1-2:amd64 (0.112-2build1) ...\n",
            "Setting up libglu1-mesa:amd64 (9.0.2-1) ...\n",
            "Setting up libdbusmenu-gtk3-4:amd64 (16.04.1+18.10.20180917-0ubuntu8) ...\n",
            "Setting up libgconf-2-4:amd64 (3.2.6-7ubuntu2) ...\n",
            "Setting up libappindicator3-1 (12.10.1+20.10.20200706.1-0ubuntu1) ...\n",
            "Setting up gconf-service (3.2.6-7ubuntu2) ...\n",
            "Setting up gconf-service-backend (3.2.6-7ubuntu2) ...\n",
            "Processing triggers for libc-bin (2.35-0ubuntu3.8) ...\n",
            "/sbin/ldconfig.real: /usr/local/lib/libtbbmalloc_proxy.so.2 is not a symbolic link\n",
            "\n",
            "/sbin/ldconfig.real: /usr/local/lib/libtbbbind.so.3 is not a symbolic link\n",
            "\n",
            "/sbin/ldconfig.real: /usr/local/lib/libur_adapter_level_zero.so.0 is not a symbolic link\n",
            "\n",
            "/sbin/ldconfig.real: /usr/local/lib/libtbbbind_2_5.so.3 is not a symbolic link\n",
            "\n",
            "/sbin/ldconfig.real: /usr/local/lib/libtbbmalloc.so.2 is not a symbolic link\n",
            "\n",
            "/sbin/ldconfig.real: /usr/local/lib/libur_loader.so.0 is not a symbolic link\n",
            "\n",
            "/sbin/ldconfig.real: /usr/local/lib/libumf.so.0 is not a symbolic link\n",
            "\n",
            "/sbin/ldconfig.real: /usr/local/lib/libtbbbind_2_0.so.3 is not a symbolic link\n",
            "\n",
            "/sbin/ldconfig.real: /usr/local/lib/libhwloc.so.15 is not a symbolic link\n",
            "\n",
            "/sbin/ldconfig.real: /usr/local/lib/libtcm_debug.so.1 is not a symbolic link\n",
            "\n",
            "/sbin/ldconfig.real: /usr/local/lib/libur_adapter_opencl.so.0 is not a symbolic link\n",
            "\n",
            "/sbin/ldconfig.real: /usr/local/lib/libtbb.so.12 is not a symbolic link\n",
            "\n",
            "/sbin/ldconfig.real: /usr/local/lib/libtcm.so.1 is not a symbolic link\n",
            "\n",
            "Archive:  chromedriver_linux64.zip\n",
            "  inflating: chromedriver            \n",
            "  inflating: LICENSE.chromedriver    \n"
          ]
        }
      ],
      "source": [
        "# Install Chrome\n",
        "!apt-get update -q\n",
        "!apt-get install -y wget curl unzip\n",
        "!wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb\n",
        "!dpkg -i google-chrome-stable_current_amd64.deb\n",
        "!apt --fix-broken install -y\n",
        "\n",
        "# Install dependencies for Chrome\n",
        "!apt-get install -y libx11-dev libx11-xcb1 libglu1-mesa libxi6 libgconf-2-4 libnss3 libxss1 libappindicator3-1 libasound2 libxtst6\n",
        "\n",
        "# Install ChromeDriver\n",
        "!wget -q https://chromedriver.storage.googleapis.com/113.0.5672.63/chromedriver_linux64.zip\n",
        "!unzip chromedriver_linux64.zip\n",
        "!mv chromedriver /usr/bin/chromedriver\n",
        "!chmod +x /usr/bin/chromedriver"
      ]
    },
    {
      "cell_type": "markdown",
      "source": [
        "Packages"
      ],
      "metadata": {
        "id": "8yLARgacEDjR"
      }
    },
    {
      "cell_type": "code",
      "source": [
        "pip install selenium webdriver-manager"
      ],
      "metadata": {
        "id": "Hb2k8Lh1EEbn",
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "outputId": "7cec1b5a-f78b-48d9-89be-7dcced16ec3b"
      },
      "execution_count": 5,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "Requirement already satisfied: selenium in /usr/local/lib/python3.11/dist-packages (4.29.0)\n",
            "Requirement already satisfied: webdriver-manager in /usr/local/lib/python3.11/dist-packages (4.0.2)\n",
            "Requirement already satisfied: urllib3<3,>=1.26 in /usr/local/lib/python3.11/dist-packages (from urllib3[socks]<3,>=1.26->selenium) (2.3.0)\n",
            "Requirement already satisfied: trio~=0.17 in /usr/local/lib/python3.11/dist-packages (from selenium) (0.29.0)\n",
            "Requirement already satisfied: trio-websocket~=0.9 in /usr/local/lib/python3.11/dist-packages (from selenium) (0.12.2)\n",
            "Requirement already satisfied: certifi>=2021.10.8 in /usr/local/lib/python3.11/dist-packages (from selenium) (2025.1.31)\n",
            "Requirement already satisfied: typing_extensions~=4.9 in /usr/local/lib/python3.11/dist-packages (from selenium) (4.12.2)\n",
            "Requirement already satisfied: websocket-client~=1.8 in /usr/local/lib/python3.11/dist-packages (from selenium) (1.8.0)\n",
            "Requirement already satisfied: requests in /usr/local/lib/python3.11/dist-packages (from webdriver-manager) (2.32.3)\n",
            "Requirement already satisfied: python-dotenv in /usr/local/lib/python3.11/dist-packages (from webdriver-manager) (1.0.1)\n",
            "Requirement already satisfied: packaging in /usr/local/lib/python3.11/dist-packages (from webdriver-manager) (24.2)\n",
            "Requirement already satisfied: attrs>=23.2.0 in /usr/local/lib/python3.11/dist-packages (from trio~=0.17->selenium) (25.1.0)\n",
            "Requirement already satisfied: sortedcontainers in /usr/local/lib/python3.11/dist-packages (from trio~=0.17->selenium) (2.4.0)\n",
            "Requirement already satisfied: idna in /usr/local/lib/python3.11/dist-packages (from trio~=0.17->selenium) (3.10)\n",
            "Requirement already satisfied: outcome in /usr/local/lib/python3.11/dist-packages (from trio~=0.17->selenium) (1.3.0.post0)\n",
            "Requirement already satisfied: sniffio>=1.3.0 in /usr/local/lib/python3.11/dist-packages (from trio~=0.17->selenium) (1.3.1)\n",
            "Requirement already satisfied: wsproto>=0.14 in /usr/local/lib/python3.11/dist-packages (from trio-websocket~=0.9->selenium) (1.2.0)\n",
            "Requirement already satisfied: pysocks!=1.5.7,<2.0,>=1.5.6 in /usr/local/lib/python3.11/dist-packages (from urllib3[socks]<3,>=1.26->selenium) (1.7.1)\n",
            "Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.11/dist-packages (from requests->webdriver-manager) (3.4.1)\n",
            "Requirement already satisfied: h11<1,>=0.9.0 in /usr/local/lib/python3.11/dist-packages (from wsproto>=0.14->trio-websocket~=0.9->selenium) (0.14.0)\n"
          ]
        }
      ]
    },
    {
      "cell_type": "markdown",
      "source": [
        "## 2. Retrieve texts from website\n",
        "\n",
        "###Methodology\n",
        "1. Get all the champions name from https://leagueoflegends.fandom.com/wiki/List_of_champions and store it as a list using BeautifulSoul. As it also extract the champion role this can be used as extra information. \\\\\n",
        "2. For each champion {champion_name} we will go to https://universe.leagueoflegends.com/en_GB/story/champion/{champion_name}/ and extract the story text using BeautifulSoup. The name of the champion will go through a process to fit the url. \\\\\n",
        "BeautifulSoup extract the HTML text faster than Selenium. However, it sometimes fail to find the story text (such as Aurora, Ambessa) as it doesn't appear. In that case we will use Selenium.\n",
        "3. We create a dataframe that include the name of the champion associated with its role and story."
      ],
      "metadata": {
        "id": "fy-ph5nDEoWp"
      }
    },
    {
      "cell_type": "markdown",
      "source": [
        "## Step 1: Collect champions name"
      ],
      "metadata": {
        "id": "fj2MCu5WGyDw"
      }
    },
    {
      "cell_type": "code",
      "source": [
        "import requests\n",
        "from bs4 import BeautifulSoup\n",
        "\n",
        "# URL of the list of champions\n",
        "url = \"https://leagueoflegends.fandom.com/wiki/List_of_champions\"\n",
        "\n",
        "# Send a GET request to fetch the page\n",
        "response = requests.get(url)\n",
        "\n",
        "# Parse the HTML content using BeautifulSoup\n",
        "soup = BeautifulSoup(response.text, 'html.parser')\n",
        "\n",
        "# Find all td tags with the data-sort-value attribute\n",
        "champion_td_tags = soup.find_all('td', attrs={'data-sort-value': True})\n",
        "\n",
        "# Extract the champion names from the data-sort-value attribute\n",
        "champions = [tag['data-sort-value'] for tag in champion_td_tags]"
      ],
      "metadata": {
        "id": "c3ckS_EpGz20"
      },
      "execution_count": 6,
      "outputs": []
    },
    {
      "cell_type": "code",
      "source": [
        "# Create champions name and role list from the previous extraction\n",
        "champions_name, champions_role = [], []\n",
        "for i, value in enumerate(champions):\n",
        "  if i % 3 == 0:\n",
        "    champions_name.append(value)\n",
        "  if i % 3 == 1:\n",
        "    champions_role.append(value)"
      ],
      "metadata": {
        "id": "eNdAqgrmG7ix"
      },
      "execution_count": 7,
      "outputs": []
    },
    {
      "cell_type": "code",
      "source": [
        "champions_name"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "Ii1Pn1nVF4dI",
        "outputId": "7784479c-1c89-45b0-b90a-9d9050971cb3"
      },
      "execution_count": 9,
      "outputs": [
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "['Aatrox',\n",
              " 'Ahri',\n",
              " 'Akali',\n",
              " 'Akshan',\n",
              " 'Alistar',\n",
              " 'Ambessa',\n",
              " 'Amumu',\n",
              " 'Anivia',\n",
              " 'Annie',\n",
              " 'Aphelios',\n",
              " 'Ashe',\n",
              " 'Aurelion Sol',\n",
              " 'Aurora',\n",
              " 'Azir',\n",
              " 'Bard',\n",
              " \"Bel'Veth\",\n",
              " 'Blitzcrank',\n",
              " 'Brand',\n",
              " 'Braum',\n",
              " 'Briar',\n",
              " 'Caitlyn',\n",
              " 'Camille',\n",
              " 'Cassiopeia',\n",
              " \"Cho'Gath\",\n",
              " 'Corki',\n",
              " 'Darius',\n",
              " 'Diana',\n",
              " 'Dr. Mundo',\n",
              " 'Draven',\n",
              " 'Ekko',\n",
              " 'Elise',\n",
              " 'Evelynn',\n",
              " 'Ezreal',\n",
              " 'Fiddlesticks',\n",
              " 'Fiora',\n",
              " 'Fizz',\n",
              " 'Galio',\n",
              " 'Gangplank',\n",
              " 'Garen',\n",
              " 'Gnar',\n",
              " 'Gragas',\n",
              " 'Graves',\n",
              " 'Gwen',\n",
              " 'Hecarim',\n",
              " 'Heimerdinger',\n",
              " 'Hwei',\n",
              " 'Illaoi',\n",
              " 'Irelia',\n",
              " 'Ivern',\n",
              " 'Janna',\n",
              " 'Jarvan IV',\n",
              " 'Jax',\n",
              " 'Jayce',\n",
              " 'Jhin',\n",
              " 'Jinx',\n",
              " \"K'Sante\",\n",
              " \"Kai'Sa\",\n",
              " 'Kalista',\n",
              " 'Karma',\n",
              " 'Karthus',\n",
              " 'Kassadin',\n",
              " 'Katarina',\n",
              " 'Kayle',\n",
              " 'Kayn',\n",
              " 'Kennen',\n",
              " \"Kha'Zix\",\n",
              " 'Kindred',\n",
              " 'Kled',\n",
              " \"Kog'Maw\",\n",
              " 'LeBlanc',\n",
              " 'Lee Sin',\n",
              " 'Leona',\n",
              " 'Lillia',\n",
              " 'Lissandra',\n",
              " 'Lucian',\n",
              " 'Lulu',\n",
              " 'Lux',\n",
              " 'Malphite',\n",
              " 'Malzahar',\n",
              " 'Maokai',\n",
              " 'Master Yi',\n",
              " 'Milio',\n",
              " 'Miss Fortune',\n",
              " 'Mordekaiser',\n",
              " 'Morgana',\n",
              " 'Naafiri',\n",
              " 'Nami',\n",
              " 'Nasus',\n",
              " 'Nautilus',\n",
              " 'Neeko',\n",
              " 'Nidalee',\n",
              " 'Nilah',\n",
              " 'Nocturne',\n",
              " 'Nunu & Willump',\n",
              " 'Olaf',\n",
              " 'Orianna',\n",
              " 'Ornn',\n",
              " 'Pantheon',\n",
              " 'Poppy',\n",
              " 'Pyke',\n",
              " 'Qiyana',\n",
              " 'Quinn',\n",
              " 'Rakan',\n",
              " 'Rammus',\n",
              " \"Rek'Sai\",\n",
              " 'Rell',\n",
              " 'Renata Glasc',\n",
              " 'Renekton',\n",
              " 'Rengar',\n",
              " 'Riven',\n",
              " 'Rumble',\n",
              " 'Ryze',\n",
              " 'Samira',\n",
              " 'Sejuani',\n",
              " 'Senna',\n",
              " 'Seraphine',\n",
              " 'Sett',\n",
              " 'Shaco',\n",
              " 'Shen',\n",
              " 'Shyvana',\n",
              " 'Singed',\n",
              " 'Sion',\n",
              " 'Sivir',\n",
              " 'Skarner',\n",
              " 'Smolder',\n",
              " 'Sona',\n",
              " 'Soraka',\n",
              " 'Swain',\n",
              " 'Sylas',\n",
              " 'Syndra',\n",
              " 'Tahm Kench',\n",
              " 'Taliyah',\n",
              " 'Talon',\n",
              " 'Taric',\n",
              " 'Teemo',\n",
              " 'Thresh',\n",
              " 'Tristana',\n",
              " 'Trundle',\n",
              " 'Tryndamere',\n",
              " 'Twisted Fate',\n",
              " 'Twitch',\n",
              " 'Udyr',\n",
              " 'Urgot',\n",
              " 'Varus',\n",
              " 'Vayne',\n",
              " 'Veigar',\n",
              " \"Vel'Koz\",\n",
              " 'Vex',\n",
              " 'Vi',\n",
              " 'Viego',\n",
              " 'Viktor',\n",
              " 'Vladimir',\n",
              " 'Volibear',\n",
              " 'Warwick',\n",
              " 'Wukong',\n",
              " 'Xayah',\n",
              " 'Xerath',\n",
              " 'Xin Zhao',\n",
              " 'Yasuo',\n",
              " 'Yone',\n",
              " 'Yorick',\n",
              " 'Yuumi',\n",
              " 'Zac',\n",
              " 'Zed',\n",
              " 'Zeri',\n",
              " 'Ziggs',\n",
              " 'Zilean',\n",
              " 'Zoe',\n",
              " 'Zyra']"
            ]
          },
          "metadata": {},
          "execution_count": 9
        }
      ]
    },
    {
      "cell_type": "code",
      "source": [
        "'Dr. Mundo'.replace(\". \", \"\")"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 35
        },
        "id": "6ijPGMAJGJOB",
        "outputId": "dd0fa11f-e003-4d5c-ebef-72311c535025"
      },
      "execution_count": 10,
      "outputs": [
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "'DrMundo'"
            ],
            "application/vnd.google.colaboratory.intrinsic+json": {
              "type": "string"
            }
          },
          "metadata": {},
          "execution_count": 10
        }
      ]
    },
    {
      "cell_type": "markdown",
      "source": [
        "## Step 2: Extract its lore"
      ],
      "metadata": {
        "id": "_ZKEjxbFG-o9"
      }
    },
    {
      "cell_type": "code",
      "source": [
        "import requests\n",
        "from bs4 import BeautifulSoup\n",
        "champions_data = []\n",
        "import pandas as pd\n",
        "from selenium import webdriver\n",
        "from selenium.webdriver.chrome.service import Service\n",
        "from webdriver_manager.chrome import ChromeDriverManager\n",
        "from selenium.webdriver.common.by import By\n",
        "from selenium.webdriver.chrome.options import Options\n",
        "from selenium.webdriver.support.ui import WebDriverWait\n",
        "from selenium.webdriver.support import expected_conditions as EC\n",
        "import time\n",
        "\n",
        "# List of champions\n",
        "champions = champions_name\n",
        "# Configure options for headless Chrome\n",
        "chrome_options = Options()\n",
        "chrome_options.add_argument(\"--headless\")\n",
        "chrome_options.add_argument(\"--no-sandbox\")\n",
        "chrome_options.add_argument(\"--disable-dev-shm-usage\")\n",
        "service = Service(ChromeDriverManager().install())\n",
        "\n",
        "# Function to scrape champion data and store it\n",
        "def scrape_champion_data(champion_name):\n",
        "        # Assuming champion_name is a string\n",
        "        champion_name = champion_name.replace(\" \", \"\")  # Remove spaces\n",
        "        champion_name = champion_name.replace(\"'\", \"\")  # Remove apostrophes\n",
        "        champion_name = champion_name.replace(\".\", \"\")  # Remove dot\n",
        "        if champion_name == \"nunu&willump\":\n",
        "          champion_name = \"nunu\"\n",
        "        url = f\"https://universe.leagueoflegends.com/en_GB/story/champion/{champion_name}/\"\n",
        "        print(url)\n",
        "        # Send a GET request to fetch the page\n",
        "        response = requests.get(url)\n",
        "        response.encoding = 'utf-8'  # Set the encoding to UTF-8, or use response.apparent_encoding\n",
        "        # Parse the HTML content using BeautifulSoup\n",
        "        soup = BeautifulSoup(response.text, 'html.parser')\n",
        "\n",
        "        # Find the <meta> tag with the biography content\n",
        "        meta_tag = soup.find('meta', attrs={'name': 'description'})\n",
        "        if meta_tag and champion_name != \"ambessa\":\n",
        "            biography_text = meta_tag.get('content')\n",
        "            champions_data.append({\n",
        "                \"Champion\": champion_name,\n",
        "                \"Text\": biography_text\n",
        "          })\n",
        "        else:\n",
        "          try:\n",
        "\n",
        "            browser = webdriver.Chrome(service=service, options=chrome_options)\n",
        "\n",
        "            # Construct URL for the champion\n",
        "            url = f\"https://universe.leagueoflegends.com/en_GB/story/champion/{champion_name}/\"\n",
        "\n",
        "            # Open the page\n",
        "            browser.get(url)\n",
        "\n",
        "            # Wait for the page to load and the desired element to be visible\n",
        "            WebDriverWait(browser, 10).until(\n",
        "                EC.presence_of_element_located((By.CLASS_NAME, \"root_3nvd.dark_1RHo\"))\n",
        "            )\n",
        "\n",
        "            # Scroll down to ensure content is loaded\n",
        "            browser.execute_script(\"window.scrollTo(0, document.body.scrollHeight / 2);\")\n",
        "\n",
        "            # Extract the text content\n",
        "            element = browser.find_element(By.CLASS_NAME, \"root_3nvd.dark_1RHo\")\n",
        "            text_content = element.text\n",
        "\n",
        "            # Append the data to the list\n",
        "            champions_data.append({\n",
        "                \"Champion\": champion_name,\n",
        "                \"Text\": text_content\n",
        "            })\n",
        "            browser.quit()\n",
        "          except:\n",
        "            champions_data.append({\n",
        "                \"Champion\": champion_name,\n",
        "                \"Text\": f\"Biography content not found for {champion_name}.\"\n",
        "            })\n",
        "            print(\"Biography content not found.\")\n",
        "# Loop through the champions and scrape data\n",
        "for champion in champions:\n",
        "    scrape_champion_data(champion.lower())\n"
      ],
      "metadata": {
        "id": "wlz85RVREnkp",
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "outputId": "d60072ac-33cd-4dbf-d82e-f36cad4ab33d"
      },
      "execution_count": 13,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "https://universe.leagueoflegends.com/en_GB/story/champion/aatrox/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/ahri/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/akali/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/akshan/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/alistar/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/ambessa/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/amumu/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/anivia/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/annie/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/aphelios/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/ashe/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/aurelionsol/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/aurora/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/azir/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/bard/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/belveth/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/blitzcrank/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/brand/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/braum/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/briar/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/caitlyn/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/camille/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/cassiopeia/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/chogath/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/corki/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/darius/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/diana/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/drmundo/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/draven/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/ekko/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/elise/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/evelynn/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/ezreal/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/fiddlesticks/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/fiora/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/fizz/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/galio/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/gangplank/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/garen/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/gnar/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/gragas/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/graves/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/gwen/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/hecarim/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/heimerdinger/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/hwei/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/illaoi/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/irelia/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/ivern/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/janna/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/jarvaniv/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/jax/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/jayce/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/jhin/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/jinx/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/ksante/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/kaisa/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/kalista/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/karma/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/karthus/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/kassadin/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/katarina/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/kayle/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/kayn/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/kennen/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/khazix/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/kindred/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/kled/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/kogmaw/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/leblanc/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/leesin/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/leona/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/lillia/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/lissandra/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/lucian/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/lulu/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/lux/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/malphite/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/malzahar/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/maokai/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/masteryi/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/milio/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/missfortune/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/mordekaiser/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/morgana/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/naafiri/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/nami/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/nasus/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/nautilus/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/neeko/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/nidalee/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/nilah/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/nocturne/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/nunu/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/olaf/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/orianna/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/ornn/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/pantheon/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/poppy/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/pyke/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/qiyana/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/quinn/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/rakan/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/rammus/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/reksai/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/rell/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/renataglasc/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/renekton/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/rengar/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/riven/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/rumble/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/ryze/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/samira/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/sejuani/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/senna/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/seraphine/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/sett/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/shaco/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/shen/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/shyvana/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/singed/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/sion/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/sivir/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/skarner/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/smolder/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/sona/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/soraka/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/swain/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/sylas/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/syndra/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/tahmkench/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/taliyah/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/talon/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/taric/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/teemo/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/thresh/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/tristana/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/trundle/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/tryndamere/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/twistedfate/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/twitch/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/udyr/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/urgot/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/varus/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/vayne/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/veigar/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/velkoz/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/vex/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/vi/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/viego/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/viktor/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/vladimir/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/volibear/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/warwick/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/wukong/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/xayah/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/xerath/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/xinzhao/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/yasuo/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/yone/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/yorick/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/yuumi/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/zac/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/zed/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/zeri/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/ziggs/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/zilean/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/zoe/\n",
            "https://universe.leagueoflegends.com/en_GB/story/champion/zyra/\n"
          ]
        }
      ]
    },
    {
      "cell_type": "markdown",
      "source": [
        "## Step 3: Transform into dataframe"
      ],
      "metadata": {
        "id": "ESQDGQl2HDvW"
      }
    },
    {
      "cell_type": "code",
      "source": [
        "# Create a DataFrame from the list of champions data\n",
        "df1 = pd.DataFrame(champions_data)\n",
        "\n",
        "# Rename columns\n",
        "df1.columns = ['Champion', 'Story']\n",
        "\n",
        "# Add champions role\n",
        "df1['Role'] = champions_role\n",
        "\n",
        "# Undo the champions name changed for url\n",
        "df1['Champion'] = champions_name\n",
        "\n",
        "# Save it to a CSV file if you want\n",
        "df1.to_csv(\"champions_data.csv\", index=False)"
      ],
      "metadata": {
        "id": "AHCHv4EJHGyg"
      },
      "execution_count": 16,
      "outputs": []
    },
    {
      "cell_type": "code",
      "source": [
        "df1"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 423
        },
        "id": "79wwP4P5HNPf",
        "outputId": "39185e1f-633b-42ad-8d11-1681edd13c66"
      },
      "execution_count": 15,
      "outputs": [
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "    Champion                                              Story  \\\n",
              "0     Aatrox  Whether mistaken for a demon or god, many tale...   \n",
              "1       Ahri  For most of her life, Ahri's origins were a my...   \n",
              "2      Akali  Ionia has always been a land of wild magic, it...   \n",
              "3     Akshan  Dashing through the shadows of eastern Shurima...   \n",
              "4    Alistar  Many civilizations have resisted Noxus, but no...   \n",
              "..       ...                                                ...   \n",
              "164     Zeri  Raised in a large working-class family, Zeri g...   \n",
              "165    Ziggs  Ziggs was born with a talent for tinkering, bu...   \n",
              "166   Zilean  Icathia, most desolate and cursed of lands, wa...   \n",
              "167      Zoe  As befits her Targonian Aspect’s nature, Zoe d...   \n",
              "168     Zyra  Zyra’s memory is long, and runs as deep as the...   \n",
              "\n",
              "                  Role  \n",
              "0           Juggernaut  \n",
              "1                Burst  \n",
              "2             Assassin  \n",
              "3    Marksman,Assassin  \n",
              "4             Vanguard  \n",
              "..                 ...  \n",
              "164           Marksman  \n",
              "165          Artillery  \n",
              "166         Specialist  \n",
              "167              Burst  \n",
              "168            Catcher  \n",
              "\n",
              "[169 rows x 3 columns]"
            ],
            "text/html": [
              "\n",
              "  <div id=\"df-b7fa5f67-2e1f-4a6f-b82c-4107c1aec563\" class=\"colab-df-container\">\n",
              "    <div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th></th>\n",
              "      <th>Champion</th>\n",
              "      <th>Story</th>\n",
              "      <th>Role</th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>0</th>\n",
              "      <td>Aatrox</td>\n",
              "      <td>Whether mistaken for a demon or god, many tale...</td>\n",
              "      <td>Juggernaut</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1</th>\n",
              "      <td>Ahri</td>\n",
              "      <td>For most of her life, Ahri's origins were a my...</td>\n",
              "      <td>Burst</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>2</th>\n",
              "      <td>Akali</td>\n",
              "      <td>Ionia has always been a land of wild magic, it...</td>\n",
              "      <td>Assassin</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>3</th>\n",
              "      <td>Akshan</td>\n",
              "      <td>Dashing through the shadows of eastern Shurima...</td>\n",
              "      <td>Marksman,Assassin</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>4</th>\n",
              "      <td>Alistar</td>\n",
              "      <td>Many civilizations have resisted Noxus, but no...</td>\n",
              "      <td>Vanguard</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>...</th>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>164</th>\n",
              "      <td>Zeri</td>\n",
              "      <td>Raised in a large working-class family, Zeri g...</td>\n",
              "      <td>Marksman</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>165</th>\n",
              "      <td>Ziggs</td>\n",
              "      <td>Ziggs was born with a talent for tinkering, bu...</td>\n",
              "      <td>Artillery</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>166</th>\n",
              "      <td>Zilean</td>\n",
              "      <td>Icathia, most desolate and cursed of lands, wa...</td>\n",
              "      <td>Specialist</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>167</th>\n",
              "      <td>Zoe</td>\n",
              "      <td>As befits her Targonian Aspect’s nature, Zoe d...</td>\n",
              "      <td>Burst</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>168</th>\n",
              "      <td>Zyra</td>\n",
              "      <td>Zyra’s memory is long, and runs as deep as the...</td>\n",
              "      <td>Catcher</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "<p>169 rows × 3 columns</p>\n",
              "</div>\n",
              "    <div class=\"colab-df-buttons\">\n",
              "\n",
              "  <div class=\"colab-df-container\">\n",
              "    <button class=\"colab-df-convert\" onclick=\"convertToInteractive('df-b7fa5f67-2e1f-4a6f-b82c-4107c1aec563')\"\n",
              "            title=\"Convert this dataframe to an interactive table.\"\n",
              "            style=\"display:none;\">\n",
              "\n",
              "  <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\">\n",
              "    <path d=\"M120-120v-720h720v720H120Zm60-500h600v-160H180v160Zm220 220h160v-160H400v160Zm0 220h160v-160H400v160ZM180-400h160v-160H180v160Zm440 0h160v-160H620v160ZM180-180h160v-160H180v160Zm440 0h160v-160H620v160Z\"/>\n",
              "  </svg>\n",
              "    </button>\n",
              "\n",
              "  <style>\n",
              "    .colab-df-container {\n",
              "      display:flex;\n",
              "      gap: 12px;\n",
              "    }\n",
              "\n",
              "    .colab-df-convert {\n",
              "      background-color: #E8F0FE;\n",
              "      border: none;\n",
              "      border-radius: 50%;\n",
              "      cursor: pointer;\n",
              "      display: none;\n",
              "      fill: #1967D2;\n",
              "      height: 32px;\n",
              "      padding: 0 0 0 0;\n",
              "      width: 32px;\n",
              "    }\n",
              "\n",
              "    .colab-df-convert:hover {\n",
              "      background-color: #E2EBFA;\n",
              "      box-shadow: 0px 1px 2px rgba(60, 64, 67, 0.3), 0px 1px 3px 1px rgba(60, 64, 67, 0.15);\n",
              "      fill: #174EA6;\n",
              "    }\n",
              "\n",
              "    .colab-df-buttons div {\n",
              "      margin-bottom: 4px;\n",
              "    }\n",
              "\n",
              "    [theme=dark] .colab-df-convert {\n",
              "      background-color: #3B4455;\n",
              "      fill: #D2E3FC;\n",
              "    }\n",
              "\n",
              "    [theme=dark] .colab-df-convert:hover {\n",
              "      background-color: #434B5C;\n",
              "      box-shadow: 0px 1px 3px 1px rgba(0, 0, 0, 0.15);\n",
              "      filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.3));\n",
              "      fill: #FFFFFF;\n",
              "    }\n",
              "  </style>\n",
              "\n",
              "    <script>\n",
              "      const buttonEl =\n",
              "        document.querySelector('#df-b7fa5f67-2e1f-4a6f-b82c-4107c1aec563 button.colab-df-convert');\n",
              "      buttonEl.style.display =\n",
              "        google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
              "\n",
              "      async function convertToInteractive(key) {\n",
              "        const element = document.querySelector('#df-b7fa5f67-2e1f-4a6f-b82c-4107c1aec563');\n",
              "        const dataTable =\n",
              "          await google.colab.kernel.invokeFunction('convertToInteractive',\n",
              "                                                    [key], {});\n",
              "        if (!dataTable) return;\n",
              "\n",
              "        const docLinkHtml = 'Like what you see? Visit the ' +\n",
              "          '<a target=\"_blank\" href=https://colab.research.google.com/notebooks/data_table.ipynb>data table notebook</a>'\n",
              "          + ' to learn more about interactive tables.';\n",
              "        element.innerHTML = '';\n",
              "        dataTable['output_type'] = 'display_data';\n",
              "        await google.colab.output.renderOutput(dataTable, element);\n",
              "        const docLink = document.createElement('div');\n",
              "        docLink.innerHTML = docLinkHtml;\n",
              "        element.appendChild(docLink);\n",
              "      }\n",
              "    </script>\n",
              "  </div>\n",
              "\n",
              "\n",
              "<div id=\"df-f283d2bc-ac75-4dbd-b1ce-d9f66f3109a5\">\n",
              "  <button class=\"colab-df-quickchart\" onclick=\"quickchart('df-f283d2bc-ac75-4dbd-b1ce-d9f66f3109a5')\"\n",
              "            title=\"Suggest charts\"\n",
              "            style=\"display:none;\">\n",
              "\n",
              "<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\"viewBox=\"0 0 24 24\"\n",
              "     width=\"24px\">\n",
              "    <g>\n",
              "        <path d=\"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9 17H7v-7h2v7zm4 0h-2V7h2v10zm4 0h-2v-4h2v4z\"/>\n",
              "    </g>\n",
              "</svg>\n",
              "  </button>\n",
              "\n",
              "<style>\n",
              "  .colab-df-quickchart {\n",
              "      --bg-color: #E8F0FE;\n",
              "      --fill-color: #1967D2;\n",
              "      --hover-bg-color: #E2EBFA;\n",
              "      --hover-fill-color: #174EA6;\n",
              "      --disabled-fill-color: #AAA;\n",
              "      --disabled-bg-color: #DDD;\n",
              "  }\n",
              "\n",
              "  [theme=dark] .colab-df-quickchart {\n",
              "      --bg-color: #3B4455;\n",
              "      --fill-color: #D2E3FC;\n",
              "      --hover-bg-color: #434B5C;\n",
              "      --hover-fill-color: #FFFFFF;\n",
              "      --disabled-bg-color: #3B4455;\n",
              "      --disabled-fill-color: #666;\n",
              "  }\n",
              "\n",
              "  .colab-df-quickchart {\n",
              "    background-color: var(--bg-color);\n",
              "    border: none;\n",
              "    border-radius: 50%;\n",
              "    cursor: pointer;\n",
              "    display: none;\n",
              "    fill: var(--fill-color);\n",
              "    height: 32px;\n",
              "    padding: 0;\n",
              "    width: 32px;\n",
              "  }\n",
              "\n",
              "  .colab-df-quickchart:hover {\n",
              "    background-color: var(--hover-bg-color);\n",
              "    box-shadow: 0 1px 2px rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);\n",
              "    fill: var(--button-hover-fill-color);\n",
              "  }\n",
              "\n",
              "  .colab-df-quickchart-complete:disabled,\n",
              "  .colab-df-quickchart-complete:disabled:hover {\n",
              "    background-color: var(--disabled-bg-color);\n",
              "    fill: var(--disabled-fill-color);\n",
              "    box-shadow: none;\n",
              "  }\n",
              "\n",
              "  .colab-df-spinner {\n",
              "    border: 2px solid var(--fill-color);\n",
              "    border-color: transparent;\n",
              "    border-bottom-color: var(--fill-color);\n",
              "    animation:\n",
              "      spin 1s steps(1) infinite;\n",
              "  }\n",
              "\n",
              "  @keyframes spin {\n",
              "    0% {\n",
              "      border-color: transparent;\n",
              "      border-bottom-color: var(--fill-color);\n",
              "      border-left-color: var(--fill-color);\n",
              "    }\n",
              "    20% {\n",
              "      border-color: transparent;\n",
              "      border-left-color: var(--fill-color);\n",
              "      border-top-color: var(--fill-color);\n",
              "    }\n",
              "    30% {\n",
              "      border-color: transparent;\n",
              "      border-left-color: var(--fill-color);\n",
              "      border-top-color: var(--fill-color);\n",
              "      border-right-color: var(--fill-color);\n",
              "    }\n",
              "    40% {\n",
              "      border-color: transparent;\n",
              "      border-right-color: var(--fill-color);\n",
              "      border-top-color: var(--fill-color);\n",
              "    }\n",
              "    60% {\n",
              "      border-color: transparent;\n",
              "      border-right-color: var(--fill-color);\n",
              "    }\n",
              "    80% {\n",
              "      border-color: transparent;\n",
              "      border-right-color: var(--fill-color);\n",
              "      border-bottom-color: var(--fill-color);\n",
              "    }\n",
              "    90% {\n",
              "      border-color: transparent;\n",
              "      border-bottom-color: var(--fill-color);\n",
              "    }\n",
              "  }\n",
              "</style>\n",
              "\n",
              "  <script>\n",
              "    async function quickchart(key) {\n",
              "      const quickchartButtonEl =\n",
              "        document.querySelector('#' + key + ' button');\n",
              "      quickchartButtonEl.disabled = true;  // To prevent multiple clicks.\n",
              "      quickchartButtonEl.classList.add('colab-df-spinner');\n",
              "      try {\n",
              "        const charts = await google.colab.kernel.invokeFunction(\n",
              "            'suggestCharts', [key], {});\n",
              "      } catch (error) {\n",
              "        console.error('Error during call to suggestCharts:', error);\n",
              "      }\n",
              "      quickchartButtonEl.classList.remove('colab-df-spinner');\n",
              "      quickchartButtonEl.classList.add('colab-df-quickchart-complete');\n",
              "    }\n",
              "    (() => {\n",
              "      let quickchartButtonEl =\n",
              "        document.querySelector('#df-f283d2bc-ac75-4dbd-b1ce-d9f66f3109a5 button');\n",
              "      quickchartButtonEl.style.display =\n",
              "        google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
              "    })();\n",
              "  </script>\n",
              "</div>\n",
              "\n",
              "  <div id=\"id_70fc6d1a-fc2f-4991-9d29-e6842aec3fcb\">\n",
              "    <style>\n",
              "      .colab-df-generate {\n",
              "        background-color: #E8F0FE;\n",
              "        border: none;\n",
              "        border-radius: 50%;\n",
              "        cursor: pointer;\n",
              "        display: none;\n",
              "        fill: #1967D2;\n",
              "        height: 32px;\n",
              "        padding: 0 0 0 0;\n",
              "        width: 32px;\n",
              "      }\n",
              "\n",
              "      .colab-df-generate:hover {\n",
              "        background-color: #E2EBFA;\n",
              "        box-shadow: 0px 1px 2px rgba(60, 64, 67, 0.3), 0px 1px 3px 1px rgba(60, 64, 67, 0.15);\n",
              "        fill: #174EA6;\n",
              "      }\n",
              "\n",
              "      [theme=dark] .colab-df-generate {\n",
              "        background-color: #3B4455;\n",
              "        fill: #D2E3FC;\n",
              "      }\n",
              "\n",
              "      [theme=dark] .colab-df-generate:hover {\n",
              "        background-color: #434B5C;\n",
              "        box-shadow: 0px 1px 3px 1px rgba(0, 0, 0, 0.15);\n",
              "        filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.3));\n",
              "        fill: #FFFFFF;\n",
              "      }\n",
              "    </style>\n",
              "    <button class=\"colab-df-generate\" onclick=\"generateWithVariable('df1')\"\n",
              "            title=\"Generate code using this dataframe.\"\n",
              "            style=\"display:none;\">\n",
              "\n",
              "  <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\"viewBox=\"0 0 24 24\"\n",
              "       width=\"24px\">\n",
              "    <path d=\"M7,19H8.4L18.45,9,17,7.55,7,17.6ZM5,21V16.75L18.45,3.32a2,2,0,0,1,2.83,0l1.4,1.43a1.91,1.91,0,0,1,.58,1.4,1.91,1.91,0,0,1-.58,1.4L9.25,21ZM18.45,9,17,7.55Zm-12,3A5.31,5.31,0,0,0,4.9,8.1,5.31,5.31,0,0,0,1,6.5,5.31,5.31,0,0,0,4.9,4.9,5.31,5.31,0,0,0,6.5,1,5.31,5.31,0,0,0,8.1,4.9,5.31,5.31,0,0,0,12,6.5,5.46,5.46,0,0,0,6.5,12Z\"/>\n",
              "  </svg>\n",
              "    </button>\n",
              "    <script>\n",
              "      (() => {\n",
              "      const buttonEl =\n",
              "        document.querySelector('#id_70fc6d1a-fc2f-4991-9d29-e6842aec3fcb button.colab-df-generate');\n",
              "      buttonEl.style.display =\n",
              "        google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
              "\n",
              "      buttonEl.onclick = () => {\n",
              "        google.colab.notebook.generateWithVariable('df1');\n",
              "      }\n",
              "      })();\n",
              "    </script>\n",
              "  </div>\n",
              "\n",
              "    </div>\n",
              "  </div>\n"
            ],
            "application/vnd.google.colaboratory.intrinsic+json": {
              "type": "dataframe",
              "variable_name": "df1",
              "summary": "{\n  \"name\": \"df1\",\n  \"rows\": 169,\n  \"fields\": [\n    {\n      \"column\": \"Champion\",\n      \"properties\": {\n        \"dtype\": \"string\",\n        \"num_unique_values\": 169,\n        \"samples\": [\n          \"Tryndamere\",\n          \"Elise\",\n          \"Shyvana\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"Story\",\n      \"properties\": {\n        \"dtype\": \"string\",\n        \"num_unique_values\": 169,\n        \"samples\": [\n          \"Tryndamere came into the world knowing only the harshness of survival, for the frozen steppes where his clan made their home never truly thawed. Though they praised all the Freljord\\u2019s old gods, as well as the Cult of the Three, they prayed most often to a spirit-deity known to ravage the tundra\\u2014a hearty and unkillable tusklord. Since the raw materials required for armor were scarce, the clan instead put its resources toward the forging of great blades, inspired by their god\\u2019s ivory canines.The stamina and dueling prowess of Tryndamere\\u2019s people became legendary. They were able to fend off other raiding tribes, slay the great beasts of the mountains, and repel Noxians encroaching to the south. Tryndamere himself grew to be a brash and formidable warrior, but it wasn\\u2019t until a particularly cruel midwinter night that his strength was truly tested. An unusual storm swept in from the east, bringing with it an icy darkness, and a towering, horned figure silhouetted against the full moon.Some in the clan knelt, believing that their boar-god stood among them. This creature dripped with ancient magic, true enough, but he was not of the Freljord\\u2026 and those that knelt were the first to die.Tryndamere looked on in horror. He could feel unhinged brutality rising in his heart at the sight of the invader\\u2019s cruel, living sword. Whether taken by bloodlust or some other madness, Tryndamere raised his own blade, and let out a defiant roar.The dark figure swatted him aside like an insect.Tryndamere lay surrounded by the dead, in snow soaked almost black with blood. He drew what he thought would be his last breaths as the creature approached and spoke. Tryndamere tried to hold onto the strange, archaic words, but as his life force slipped away, it was the thing\\u2019s laughter that burned itself into the young warrior\\u2019s memory.For Tryndamere did not die that night. He was revived by a rage unlike anything he had ever experienced. He looked to the eastern horizon, intent on avenging not only the destruction of his clan, but the desecration of his own martial pride.However, retribution was not what the steppes offered him. There were survivors, and they would not be long for this world if Tryndamere could not find others to shelter them. There were Noxians to the south, Frostguard to the north, and the dark figure had come from the east. To the west, it was said that some tribes were gathering before the supposed reincarnation of Avarosa\\u2014once, he might have dismissed such fanciful rumors, but now he knew this was his only recourse.Tryndamere and the remnants of his people arrived in the valley as little more than beggars. The young warrior was determined to show his clan\\u2019s worth, and win them the Avarosan leader\\u2019s protection so that he could return to thoughts of revenge. Brandishing his tusked sword, he did what came naturally, and challenged others to duels. Holding the image of the dark figure and its echoing laughter in his mind, Tryndamere quickly bested anyone who stepped forward.His singular fury was deeply unsettling to the Avarosans. The northern warriors, too, noted his rapid healing between bouts\\u2014unlike the Iceborn that walked among them, the more Tryndamere gave in to his rage, the more quickly his body healed. Many suspected he and his clan practiced strange and unnatural magics, and so Tryndamere\\u2019s plan to prove his worth was now endangering the wider acceptance of his people.But not all of the Avarosans had turned against him. Their warmother, Ashe, was looking to strengthen her position with a political marriage\\u2026 to someone who could face down the endless challengers for her hand, and to her rule. Seeing an opportunity in the handsome barbarian, she pledged to take in his clan as Avarosans, if Tryndamere became her first and only bloodsworn.As he spent more time in Ashe\\u2019s company, he began to believe what others had whispered\\u2014that she was indeed the divine reincarnation of Avarosa herself. His rage found temperance in her thoughtful leadership, and a genuine affection grew between them.Even so, serving as Ashe\\u2019s champion, Tryndamere now looks to an uncertain future. The barbarian king can see war brewing all too clearly on the Freljord\\u2019s horizon, yet he still thirsts for his own, personal vengeance, and begins to wonder if his predestined fate might not be at his queen\\u2019s side after all\\u2026\",\n          \"The Lady Elise was born centuries ago to House Kythera, one of the oldest bloodlines of Noxus, and swiftly learned the power of beauty to influence the weak.When she came of age, she entertained the courtship of Berholdt, heir to House Zaavan. Their union was opposed by many, since it would strengthen Kythera at Zaavan\\u2019s expense\\u2014but Elise worked hard to beguile her intended husband, and manipulated her detractors to secure a betrothal.Unbeknown to her, this political marriage had been planned for many years by shadowy forces working behind the scenes throughout the empire, with Berholdt Zaavan a mere pawn in a much larger game. Even so, it was an unexpected twist that Elise should dominate him so completely, and while he remained the face of his house, it was clear who was in charge. As time passed, his resentment grew.One evening, over a typically frosty dinner, Berholdt revealed he had poisoned her wine, and demanded Elise withdraw from society and allow him to take up the reins of power. Knowing he would have the antidote about his person, Elise played the role of a remorseful wife, weeping and begging her husband\\u2019s forgiveness. Just as it seemed he might be convinced, she snatched up a knife and plunged it into his heart.Even with the antidote, Elise was bedridden for weeks\\u2026 and it was then that the Pale Woman approached her.The enigmatic mistress of \\u201cthe Black Rose\\u201d spoke of a secret society where hidden knowledge and sorcery were shared among those who could be trusted, and kept from those who could not. In truth, the Pale Woman did not care who controlled each of the noble houses, as long as they were sworn to her. Since Elise had killed the thrall Berholdt, she would have to prove her own value, or a more suitable replacement would be found.Seeing a path to greater power, Elise took to the cabal like few before her. She met often with the most prominent members, trading influence and thwarting her rivals in a complex web of tangled schemes. With the wealth of two houses, there were not many who could oppose her, and she became even more adept at persuading others to do her bidding.Eventually, she learned of an object that held great significance for the Black Rose\\u2014the skull of an ancient warlord known as Sahn-Uzal, rumored to have been hidden long ago in the Shadow Isles. Keen to gain the Pale Woman\\u2019s favor, Elise found a desperate, debt-ridden captain willing to bear her and a handful of devotees to the cursed city of Helia. They came ashore on a beach of ashen sand, and were tormented by spiteful wraiths as they searched in vain for the lost vault.But Elise found something she had not anticipated.A creature of the long-forgotten past had made its home in the lightless depths beneath the city. This bloated, chitinous monster was the spider-god Vilemaw, and it erupted from the darkness to devour the intruders, before sinking its fangs into Elise\\u2019s shoulder. She fell, howling and convulsing as the venom wrought terrible changes upon her body. Her spine rippled with undulant motion, and arachnoid legs pushed out from her flesh.Finally, breathless with the agony of transformation, Elise turned to find her new master looming above her. An unspoken understanding passed between them in that moment, and she scuttled back to the beach, untroubled by the Isles\\u2019 spirits as she weaved in and out of the twisted treeline.Some weeks later, when her ship arrived back at the Noxian capital in the dead of night, Elise had regained her human form\\u2026 though she was the only living thing left aboard.Though no evidence was ever found of the warlord\\u2019s skull, the Pale Woman saw Elise\\u2019s dangerous new gift for what it was\\u2014a means to come and go safely between Noxus and the Shadow Isles. An accord was struck, wherein the Black Rose would provide Elise with endless unwitting sacrifices to offer up to the spider-god, and in return she would recover any artifacts of power she could from those benighted, forbidding shores.Elise once again took up residence in the neglected halls of House Zaavan, carefully cultivating a reputation as a seductive yet unreachable recluse. Few have ever guessed her true nature, yet fanciful rumors abound\\u2014wild tales of her ageless beauty, and a terrifying, voracious creature said to lair in the bowels of her dilapidated, dust-wreathed palace.Though centuries have passed, whenever Elise feels the summons of her god, she returns to the land of the Black Mist with a hapless suitor in tow, or some other easily swayed soul.And none who accompany her ever return.\",\n          \"Though they are rare creatures now indeed, there exist a handful of places across Runeterra where the great elemental dragons still nest.Long after the fall of the Shuriman empire, in the chambers beneath a lost volcano, the elder beast known as Yvva guarded her clutch of eggs. Beyond the depredations of rival drakes, dragon eggs were priceless almost beyond a mortal\\u2019s comprehension, and so many were daring or foolish enough to try their luck. Yvva feasted upon the charred remains of a score or more would-be thieves over the years\\u2026 before one succeeded in his attempt.This upstart mage fled the mountains with the large egg hugged close to his chest, the jungle at his heels set ablaze by Yvva\\u2019s fury. Against all odds, he reached the coast and left the dragon to slink back to her lair in defeat. She had lost one egg. She would not lose another.The mage traveled north to Piltover\\u2014but before he could find a buyer, the egg began to hatch. Whether it was the act of removing it from the nest, or the last moon of autumn giving way to winter, something had changed. It was no infant dragon that emerged, but an apparently humanoid baby girl with pale, violet skin, and the mage found he could not bear to abandon her. He raised the child as his own, naming her Shyvana after the dark legend of her brood-mother.It became clear that Shyvana was no mortal. From an early age, she was able to shift her form into something monstrous, akin to the half-dragons of ancient myth. This made living among the common folk of Valoran difficult, to say the least. One thing was clear: Yvva retained some connection with her lost daughter, and it grew stronger over time. When her other offspring finally took flight, Yvva left her empty nest and soared far over the ocean in search of Shyvana.The land was wracked by fierce border wars, but armies and villagers alike scattered at the great dragon\\u2019s approach. Seeking refuge in a ruined farmhouse, Shyvana saw her adopted father engulfed in flames as Yvva swept low overhead\\u2014the young woman dragged him into the nearby forest, but there was nothing more she could do. She buried him in a simple grave beneath a spreading oak, and set off alone.After many weeks in hiding in the wilds, always on the move, Shyvana picked out the faint scent of blood among the trees. She found a wounded warrior, close to death, and knew this was someone she could save.Without a thought for the beast that hunted her, she assumed her half-dragon form and carried the unconscious man far away, to an outpost on the borders of Demacia.There, in the castle at Wrenwall, Shyvana discovered that this warrior was none other than Prince Jarvan\\u2014the king\\u2019s only son, and heir to the throne. Though the stationed soldiers regarded her violet skin and strange manners with some suspicion, she was made welcome. Demacians, it seemed, always looked out for one another, and her time in the town was the most peaceful she had ever known.The peace was not to last. Shyvana sensed darkness on the wind. Yvva was coming.The recovering prince, knowing that he had to marshal Wrenwall\\u2019s garrison, brought the terrified locals inside the stronghold in preparation for the coming battle. Even so, Shyvana prepared to make her escape. Jarvan confronted her, and she admitted that the creature in pursuit of her was of her own blood. She could not allow innocent people to die for that.Jarvan refused to let her go. Shyvana had saved his life, so it was only right that he fight at her side, now. Moved by his offer, she accepted.As Yvva came into view, Demacian archers loosed volleys of arrows to keep her distracted. In retaliation, she bathed the battlements in flame, tearing at the stonework with her powerful talons and sending armored warriors tumbling from the parapet. It was then that Shyvana leapt forth, transforming in mid-air and bellowing a challenge to her brood-mother. In a sight seldom witnessed in Valoran since the Rune Wars, the two dragons clashed, tooth and claw, in the skies over Wrenwall.And finally, bleeding from a dozen wounds, Shyvana grappled Yvva to the ground, and broke the creature\\u2019s neck upon the flagstones.The prince himself honored Shyvana\\u2019s bravery, and promised that she would always have a place at his side, if she would return with him to his father\\u2019s halls. With Yvva\\u2019s skull as proof of their triumph, they set out for the Great City of Demacia together.Shyvana has learned that King Jarvan III\\u2019s realm is somewhat divided\\u2014with the people\\u2019s distrust of mages and magic putting them at odds with the noble ideals upon which it was founded. While she has found a measure of acceptance as one of the prince\\u2019s most trusted guardians, she is left to wonder whether that would still be the case if her true nature were more widely known\\u2026\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"Role\",\n      \"properties\": {\n        \"dtype\": \"category\",\n        \"num_unique_values\": 28,\n        \"samples\": [\n          \"Specialist\",\n          \"Enchanter,Warden\",\n          \"Mage,Assassin\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    }\n  ]\n}"
            }
          },
          "metadata": {},
          "execution_count": 15
        }
      ]
    }
  ]
}