Skip to content

Commit

Permalink
Disable Youtube because itis not working for some reason
Browse files Browse the repository at this point in the history
  • Loading branch information
andygrunwald committed Dec 12, 2023
1 parent 8a0bcb2 commit aad26de
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions scripts/podcast_feed_to_content.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,8 +225,8 @@ def sync_podcast_episodes(rss_feed, path_md_files, path_img_files, no_api_calls=
apple_podcast_content = get_json_content_from_url(PODCAST_APPLE_URL)
spotify_episodes = spotify_client.show_episodes(SPOTIFY_SHOW_ID, limit=50, offset=0, market="DE")
google_podcast_content = get_raw_content_from_url(PODCAST_GOOGLE_URL)
youtube_playlist_response = youtube_client.playlistItems.list(parts="snippet", maxResults=50, playlist_id=YOUTUBE_PLAYLIST_ID)
youtube_playlist_items = youtube_playlist_response.items
#youtube_playlist_response = youtube_client.playlistItems.list(parts="snippet", maxResults=50, playlist_id=YOUTUBE_PLAYLIST_ID)
#youtube_playlist_items = youtube_playlist_response.items

# Pagination and auth not respected.
# Right now it works, because a) we don't make that much requests and
Expand Down Expand Up @@ -709,13 +709,13 @@ def get_episode_link_from_google(content, title: str) -> str:
spotify_client = create_spotify_client(SPOTIFY_APP_CLIENT_ID, SPOTIFY_APP_CLIENT_SECRET)

# YouTube
YOUTUBE_API_KEY = os.getenv('YOUTUBE_API_KEY')
if not YOUTUBE_API_KEY:
logging.error("Env var YOUTUBE_API_KEY is not set properly.")
logging.error("Please double check and restart.")
sys.exit(1)
youtube_client = YoutubeClient(api_key=YOUTUBE_API_KEY)

sync_podcast_episodes(PODCAST_RSS_FEED, f"{folder_prefix}{PATH_MARKDOWN_FILES}", f"{folder_prefix}{PATH_IMAGE_FILES}", no_api_calls=args.no_api_calls, spotify_client=spotify_client, youtube_client=youtube_client)
#YOUTUBE_API_KEY = os.getenv('YOUTUBE_API_KEY')
#if not YOUTUBE_API_KEY:
# logging.error("Env var YOUTUBE_API_KEY is not set properly.")
# logging.error("Please double check and restart.")
# sys.exit(1)
#youtube_client = YoutubeClient(api_key=YOUTUBE_API_KEY)

sync_podcast_episodes(PODCAST_RSS_FEED, f"{folder_prefix}{PATH_MARKDOWN_FILES}", f"{folder_prefix}{PATH_IMAGE_FILES}", no_api_calls=args.no_api_calls, spotify_client=spotify_client, youtube_client=None)
case "redirect":
create_redirects(TOML_FILE, PATH_MARKDOWN_FILES, REDIRECT_PREFIX)

0 comments on commit aad26de

Please sign in to comment.