chaowenguo commited on
Commit
7e9e068
·
verified ·
1 Parent(s): 0ebbf4d

Update app/services/material.py

Browse files
Files changed (1) hide show
  1. app/services/material.py +2 -2
app/services/material.py CHANGED
@@ -41,7 +41,7 @@ def search_videos_pexels(
41
  video_width, video_height = aspect.to_resolution()
42
  api_key = get_api_key("pexels_api_keys")
43
  headers = {
44
- "Authorization": api_key,
45
  "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36",
46
  }
47
  # Build URL
@@ -103,7 +103,7 @@ def search_videos_pixabay(
103
  "q": search_term,
104
  "video_type": "all", # Accepted values: "all", "film", "animation"
105
  "per_page": 50,
106
- "key": api_key,
107
  }
108
  query_url = f"https://pixabay.com/api/videos/?{urlencode(params)}"
109
  logger.info(f"searching videos: {query_url}, with proxies: {config.proxy}")
 
41
  video_width, video_height = aspect.to_resolution()
42
  api_key = get_api_key("pexels_api_keys")
43
  headers = {
44
+ "Authorization": os.getenv('pexels'),
45
  "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36",
46
  }
47
  # Build URL
 
103
  "q": search_term,
104
  "video_type": "all", # Accepted values: "all", "film", "animation"
105
  "per_page": 50,
106
+ "key": os.getenv('pixabay'),
107
  }
108
  query_url = f"https://pixabay.com/api/videos/?{urlencode(params)}"
109
  logger.info(f"searching videos: {query_url}, with proxies: {config.proxy}")