@@ -55,130 +55,90 @@ def process_linktree_data(sheet_url):
55
55
56
56
def get_date_time ():
57
57
date = datetime .now ()
58
- day_of_week = date .weekday () + 1
58
+ day_name = date .strftime ( "%A" )
59
59
hour = date .hour
60
60
61
- messages = {
62
- 1 : {
63
- 9 : "Politics Nerdly" ,
64
- 10 : "Out of the Woods" ,
65
- 11 : "Limelight" ,
66
- 12 : "Is this it?" ,
67
- 13 : "Balikbayan Unbox" ,
68
- 14 : "The Football Show" ,
69
- 15 : "Paddock to Pitch" ,
70
- 16 : "Unqualified X Off Topic" ,
71
- 17 : "Shitty in the City" ,
72
- 18 : "Show X" ,
73
- 19 : "The Lunch Table" ,
74
- },
75
- 2 : {
76
- 9 : "The Dev Hour" ,
77
- 10 : "Gossip Girls" ,
78
- 11 : "Twang" ,
79
- 12 : "The Private Story" ,
80
- 13 : "Pop The Champagne" ,
81
- 14 : "Are you even listening to me?" ,
82
- 15 : "Ah here!" ,
83
- 16 : "Lawless Podcast" ,
84
- 17 : "Deep Dive" ,
85
- 18 : "Intrusive Intruders" ,
61
+ timetable = {
62
+ "Monday" : {
63
+ 9 : "The X-Philes: Sinead Keane" ,
64
+ 10 : "Tyler Murphy, Bethany Barrett, Zosia Kryszak" ,
65
+ 11 : "Ciara Stell, Emily Mullally, Clodagh Mahon" ,
66
+ 12 : "The Lunchtable: Aoife Hyland, Sé O’Reilly, Abbie Mahon Morrissey" ,
67
+ 13 : "Newswire: Daniel Hayden and Grace Collins" ,
68
+ 14 : "Action Replay: Eoin O'Sullivan and Mya Breen" ,
69
+ 15 : "Ode to Youth: Debby Ugoiwa" ,
70
+ 16 : "Perfecting perfection: Dearbhla McCormick, Aoibhín McEvoy" ,
71
+ 17 : "Headlines, headlines, headlines: Adam Van Eekeren, Ester Pyykko" ,
72
+ 18 : "Offside: Maxime Mancini" ,
86
73
19 : "No shows on at the moment" ,
87
-
74
+ 20 : "Intrusive intruders: Angelina Zhao, Erin Reel" ,
88
75
},
89
- 3 : {
90
- 9 : "The Practice Podcast" ,
91
- 10 : "The Dibs Boys" ,
92
- 11 : "The Rendezvous" ,
93
- 12 : "My Next Guest with Sadhbh O'Grady" ,
94
- 13 : "RuhRoh FM" ,
95
- 14 : "Sound Waves" ,
96
- 15 : "Assia + Leah" ,
97
- 16 : "We need therapy" ,
98
- 17 : "4 Girls 1 Brain" ,
99
- 18 : "The Dining Table" ,
100
- 19 : "Tipsey Tuesdays" ,
76
+ "Tuesday" : {
77
+ 9 : "For the Plot: Leonor Selas Amaral, Shane Patrick Meleady, Lily Quinn" ,
78
+ 10 : "Diabhal Scéal: Carla Reilly, Kate Rayel, Siobhra Behan" ,
79
+ 11 : "Tipsy Tuesday: Jack Reynolds, Ronan Casey" ,
80
+ 12 : "Kamil Kasza, Daire Canny, Anna Rzanek" ,
81
+ 13 : "Dylan Hand, Ruby McManus, Alex Rowley" ,
82
+ 14 : "Amelia O'Carroll, Essia Baouni, Leah Cahill" ,
83
+ 15 : "Limelight: Lauren Joyce and Holly O'Neill" ,
84
+ 16 : "The Dugout: Eoin O'Sullivan, Rian Lowry, Cian Mulligan, James Whittaker" ,
85
+ 17 : "HerCampus Podcast: Lauren Joyce" ,
86
+ 18 : "Eline Lund, Ceri Dunne, Marija Vasilonoka" ,
87
+ 19 : "Unfocused: Eoin Murphy, Shane Codd" ,
88
+ 20 : "Kle'epin it real: Gabby Klee" ,
101
89
},
102
- 4 : {
103
- 9 : "For the Plot" ,
104
- 10 : "Neil Fitzgerald" ,
105
- 11 : "Morning Debrief with Cian and Lauren" ,
106
- 12 : "Cinechat" ,
107
- 13 : "Action Replay" ,
108
- 14 : "Beating around the Bush" ,
109
- 15 : "The Shane O'Loughlin Podcast" ,
110
- 16 : "The Killian Burke Podcast" ,
111
- 17 : "It's a Groovement" ,
112
- 18 : "Windows Down" ,
113
- 19 : "The Original Sin" ,
90
+ "Wednesday" : {
91
+ 9 : "Journalism Away Days: Ciaran Kirk, Liam Rigley, Adam Balmer" ,
92
+ 10 : "Dibs Boys: Matthew Willis, Finn McElwain, Luke Nolan" ,
93
+ 11 : "Jake Dalton, Beth O’Connor, Shaney McConnon" ,
94
+ 12 : "Tiarnán O’Kelly, Evan Dalton" ,
95
+ 13 : "Fly on the wall: Katie Walsh, Holly Smith" ,
96
+ 14 : "Cine Chat: Torna Mulconry, Dylan Hand" ,
97
+ 15 : "Soundwaves: Sophie King, Sarah Duff" ,
98
+ 16 : "Sabina Donnery, Emma Montalbani, Paddy Wanna" ,
99
+ 17 : "The Morning debrief: Aoife Loughrey, Ella Geary, Katie Keating" ,
100
+ 18 : "Football Fraudwatch: Matthew Joyce, Aaron Ingram" ,
101
+ 19 : "The Football Show: Dylan Clarkin, Robert Curran" ,
102
+ 20 : "Sound check" ,
114
103
},
115
- 5 : {
116
- 9 : "Fed Up Fridays" ,
117
- 10 : "No shows on at the moment" ,
118
- 11 : "The Lore" ,
119
- 12 : 'The "O" Show' ,
120
- 13 : "HerVoice" ,
121
- 14 : "Newswire" ,
122
- 15 : "Lights Camera Action" ,
123
- 16 : "A Game of Two Halves" ,
124
- 17 : "The Dugout" ,
125
- 18 : "No shows on at the moment" ,
126
- 19 : "No shows on at the moment" ,
104
+ "Thursday" : {
105
+ 9 : "Theme Machine: Daire Canny" ,
106
+ 10 : "The Lore: Jane O’Reilly, Shelby Brennan, Molly McGurrin, Allyson Lambe" ,
107
+ 11 : "Amy Caffrey, Shona Nugent, Kaitlyn Firmo" ,
108
+ 12 : "Iara Moreira, Louise Akpofure, Aria Kazi" ,
109
+ 13 : "PS talking BS: Sarah Murtagh, Patrycja Sykula" ,
110
+ 14 : "This and Yap: Mya Breen, Olivia Doyle" ,
111
+ 15 : "Crow talk: David Keyes, Rian Lowry, Rory Dalton, Sam Kennedy" ,
112
+ 16 : "CinePop Chronicles: Sophie Egan and guests" ,
113
+ 17 : "The SU Crew: Karl Ormsby, Aoife Butler, Brandon Perry, Alishaer Ahmed, Jamie Mangan" ,
114
+ 18 : "Is this it?" ,
115
+ 19 : "The Original Sin: Sam Murray, Douglas Murray" ,
116
+ 20 : "Huge Jazz: Al Power, Michael Murphy, Tyler Murphy" ,
127
117
},
118
+ "Friday" : {
119
+ 9 : "Paddock to Pitch: Aimee Donnelly, Abby Whelan" ,
120
+ 10 : "Hear us out: Dylan Tierney, Aine Foy, Sarah O’Donnell" ,
121
+ 11 : "Ah Here!: Ava Shannon, Alyson Stewart, Georgia Ryan, Ella Verveen, Ellen McCahill" ,
122
+ 12 : "Gossip girls: Zöe Percival, Kacey Matthews, Mia Mulvaney, Erin Miller" ,
123
+ 13 : "Hot Girl Nonsense: Robyn Lawlor" ,
124
+ 14 : "Congitive Dissonance: Éanna Kavanagh" ,
125
+ 15 : "No shows on at the moment" ,
126
+ 16 : "DCYou want the news? : Ailish Connor, Aaron Casey" ,
127
+ 17 : "No shows on at the moment" ,
128
+ 18 : "No shows on at the moment" ,
129
+ 19 : "No shows on at the moment" ,
130
+ }
128
131
}
129
132
130
- if 1 <= day_of_week <= 5 and 9 <= hour < 19 :
131
- previous_show = messages [ day_of_week ].get (hour - 1 , "No shows on at the moment" )
132
- current_show = messages [ day_of_week ].get (hour , "No shows on at the moment" )
133
- next_show = messages [ day_of_week ].get (hour + 1 , "No shows on at the moment" )
133
+ if day_name in timetable and 9 <= hour <= 20 :
134
+ current_show = timetable [ day_name ].get (hour , "No shows on at the moment" )
135
+ previous_show = timetable [ day_name ].get (hour - 1 , "No shows on at the moment" )
136
+ next_show = timetable [ day_name ].get (hour + 1 , "No shows on at the moment" )
134
137
else :
135
- previous_show = current_show = next_show = "No shows on at the moment"
138
+ current_show = previous_show = next_show = "No shows on at the moment"
136
139
137
140
return previous_show , current_show , next_show
138
141
139
- """def get_date_time_12_hour():
140
- date = datetime.datetime.now()
141
- hour = date.hour
142
- minute = date.minute
143
- weekday = date.weekday()
144
-
145
- messages = {
146
- 9: "Intro & Interview",
147
- 9.5: "The Smelly Show(nose plugs advised) X The UnOriginal Sin",
148
- 10: "Guess Who DCU",
149
- 10.5: "Is This It?",
150
- 11: "Unqualified X OffTopic",
151
- 11.5: "Carpool Karaoke FM Edition",
152
- 12: "What Not To Do In Prague",
153
- 12.5: "Sorting Out Your Lore",
154
- 13: "Action Replay X The Dugout",
155
- 13.5: "Newswire",
156
- 14: "Soundwaves: Blind Ranking",
157
- 14.5: "Sea Week",
158
- 15: "The Practice Pod X For The Plot",
159
- 15.5: "Shitty In The City",
160
- 16: "Pop The Champagne",
161
- 16.5: "Committea",
162
- 17: "The Lunch Table",
163
- 17.5: "Lawless Podcast",
164
- 18: "TV V FM",
165
- 18.5: "Deep Dive",
166
- 19: "Balikbayan Unbox: Pinoy Henyo",
167
- 19.5: "My Next Guest X Out Of The Woods X The Shane O'Loughlin Podcast",
168
- 20: "DIBS Boys Broadcast Special",
169
- 20.5: "Auction X Wax World"
170
- }
171
- if 9 <= hour < 21:
172
- if minute >= 30:
173
- hour += 0.5
174
- current_show = messages.get(hour, "No shows on at the moment")
175
- previous_show = messages.get(hour - 0.5, "No shows on at the moment")
176
- next_show = messages.get(hour + 0.5, "No shows on at the moment")
177
- else:
178
- previous_show = current_show = next_show = "No shows on at the moment"
179
-
180
- return previous_show, current_show, next_show"""
181
-
182
142
def get_latest_video_id (channel_url ):
183
143
feed = feedparser .parse (channel_url )
184
144
0 commit comments