Skip to content

Commit

Permalink
Simplify the daily Brain Blaze analyser to avoid problems
Browse files Browse the repository at this point in the history
  • Loading branch information
krcb197 committed Apr 8, 2024
1 parent a4df8d4 commit 53b0b25
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions DailyBrainBlaze.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

from google_access_lib import YouTubeWrapper

from BrainBlazeAnalyser import ISO8601_duration_to_time_delta

import tweepy

Expand Down Expand Up @@ -127,14 +126,7 @@ def _get_videos_meta_data(self, video_id):
'liveStreamingDetails'], None)

output_record['video_id'] = item['id']
output_record['duration'] = item['contentDetails']['duration']
output_record['channel_id'] = item['snippet']['channelId']
output_record['title'] = item['snippet']['title']
output_record['Channel'] = item['snippet']['channelTitle']
output_record['publishedAt'] = item['snippet']['publishedAt']

if 'liveStreamingDetails' in item.keys():
output_record['liveStreamingDetails'] = item['liveStreamingDetails']

output.append(output_record)

Expand Down Expand Up @@ -187,10 +179,6 @@ def _df_videos_details(self):
return None
b = pd.DataFrame(self.videos_detail)
b.set_index('video_id', inplace=True)
b['Published Time'] = b['publishedAt'].apply(isoparse)
b.drop('publishedAt', axis=1, inplace=True)
b['Duration (s)'] = b['duration'].apply(ISO8601_duration_to_time_delta).dt.total_seconds()
b.drop('duration', axis=1, inplace=True)

return b.drop_duplicates(keep='last')

Expand Down

0 comments on commit 53b0b25

Please sign in to comment.