nickmuchi commited on
Commit
da3f073
·
verified ·
1 Parent(s): 6785bf2

Update functions.py

Browse files
Files changed (1) hide show
  1. functions.py +2 -7
functions.py CHANGED
@@ -37,11 +37,6 @@ def get_transcribe_podcast(rss_url, local_path='podcast'):
37
  print("Feed URL: ", rss_url)
38
  print("Local Path:", local_path)
39
 
40
- intelligence_feed = feedparser.parse(rss_url)
41
-
42
- for item in intelligence_feed.entries[0].links:
43
- if (item['type'] == 'audio/mpeg'):
44
- episode_url = item.href
45
 
46
  # Download the podcast episode by parsing the RSS feed
47
  p = Path(local_path)
@@ -51,7 +46,7 @@ def get_transcribe_podcast(rss_url, local_path='podcast'):
51
 
52
  episode_name = "podcast_episode.mp3"
53
 
54
- with requests.get(episode_url, stream=True) as r:
55
  r.raise_for_status()
56
  episode_path = p.joinpath(episode_name)
57
  print(f'episode path {episode_path}')
@@ -197,7 +192,7 @@ def get_podcast_highlights(podcast_transcript):
197
  return podcastHighlights
198
 
199
  @st.cache_data
200
- def process_podcast(url, path='output/'):
201
 
202
  '''Get podcast transcription into json'''
203
 
 
37
  print("Feed URL: ", rss_url)
38
  print("Local Path:", local_path)
39
 
 
 
 
 
 
40
 
41
  # Download the podcast episode by parsing the RSS feed
42
  p = Path(local_path)
 
46
 
47
  episode_name = "podcast_episode.mp3"
48
 
49
+ with requests.get(rss_url, stream=True) as r:
50
  r.raise_for_status()
51
  episode_path = p.joinpath(episode_name)
52
  print(f'episode path {episode_path}')
 
192
  return podcastHighlights
193
 
194
  @st.cache_data
195
+ def process_podcast(url, path='podcast'):
196
 
197
  '''Get podcast transcription into json'''
198