File tree 1 file changed +13
-2
lines changed
1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -40,9 +40,20 @@ def get_episode_list(series_soup, series):
40
40
for row in table .getText ().split ('\n \n ' ) if row .strip ()
41
41
]
42
42
else :
43
+ table_heading = table .find (name = 'tr' , class_ = None )
44
+ table_headings = [
45
+ heading .getText ().replace (' ' , '' ).lower ()
46
+ for heading in table_heading .children
47
+ ]
48
+ episode_num_index = table_headings .index ('no.inseason' )
49
+ title_index = table_headings .index ('title' )
50
+ air_date_index = table_headings .index ('originalairdate' )
51
+
52
+ wikipedia_row_unpacker = itemgetter (episode_num_index , title_index , air_date_index )
53
+
43
54
table = [
44
- [j .getText () for j in itemgetter ( 1 , 3 , 5 , 11 )( i .contents )]
45
- for i in table .find_all (class_ = 'vevent' )
55
+ [episode_row_col .getText () for episode_row_col in wikipedia_row_unpacker ( episode_row .contents )]
56
+ for episode_row in table .find_all (class_ = 'vevent' )
46
57
]
47
58
48
59
for row in table :
You can’t perform that action at this time.
0 commit comments