Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when sending request: Got 500 response. #663

Closed
badhacker0x1 opened this issue Oct 5, 2022 · 0 comments
Closed

Error when sending request: Got 500 response. #663

badhacker0x1 opened this issue Oct 5, 2022 · 0 comments

Comments

@badhacker0x1
Copy link

        def download(songid):
            url = "https://youtube-mp36.p.rapidapi.com/dl"

            querystring = {"id":songid}

            headers = {
                "X-RapidAPI-Key": "apikey",
                "User-Agent":"Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.11) Gecko/20071204 Ubuntu/7.10 (gutsy) Firefox/2.0.0.11",
                "X-RapidAPI-Host": "youtube-mp36.p.rapidapi.com"
            }
            response = requests.request("GET", url, headers=headers, params=querystring).json()
            _results = response["link"]
            return f"{_results}"
            
            elif "!yd" in msg:
                index = msg.index("!yd")
                query = msg[index+4:]
                reply = download(query)
                sendQuery()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant