RCaz commited on
Commit
c38e1e7
·
verified ·
1 Parent(s): bdfdf41

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -18,10 +18,11 @@ def download_video(url, request):
18
  os.mkdir(output_path)
19
 
20
  # get cookies
21
- export_cookies_path = "/cache/exported_cookies.txt"
 
22
  try:
23
  ydl_opts_export_cookies = {
24
- 'cookiesfrombrowser': 'firefox', # Try firefox, or 'chrome', 'edge', etc.
25
  'cookiefile': export_cookies_path,
26
  'quiet': True,
27
  }
 
18
  os.mkdir(output_path)
19
 
20
  # get cookies
21
+ export_cookies_path = "./cache/exported_cookies.txt"
22
+ os.makedirs(os.path.dirname(export_cookies_path), exist_ok=True)
23
  try:
24
  ydl_opts_export_cookies = {
25
+ 'cookiesfrombrowser': ('firefox',None,None,None),
26
  'cookiefile': export_cookies_path,
27
  'quiet': True,
28
  }