mzltest commited on
Commit
ffe2e58
·
1 Parent(s): 67439f6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -12,7 +12,7 @@ from typing import Tuple
12
  import time
13
  import requests
14
  import os
15
- from urllib.parse import urlencode
16
 
17
  logging.getLogger('numba').setLevel(logging.WARNING)
18
 
@@ -77,7 +77,7 @@ def download_audio(url):
77
 
78
  def downloadTubeUpload(query):
79
  # Step 1: Search for videos with the given query
80
- search_url = f"https://draw-8fj.begin.app/api/search/{urlencode(query)}"
81
  search_response = requests.get(search_url).json()
82
  print('1=>', search_response)
83
  # Step 2: Find the first video with duration less than 10 minutes and extract its ID
 
12
  import time
13
  import requests
14
  import os
15
+ from urllib.parse import quote
16
 
17
  logging.getLogger('numba').setLevel(logging.WARNING)
18
 
 
77
 
78
  def downloadTubeUpload(query):
79
  # Step 1: Search for videos with the given query
80
+ search_url = f"https://draw-8fj.begin.app/api/search/{quote(query)}"
81
  search_response = requests.get(search_url).json()
82
  print('1=>', search_response)
83
  # Step 2: Find the first video with duration less than 10 minutes and extract its ID