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

In flask scrapetube is getting error please help #21

Closed
adarshchri opened this issue Jan 5, 2023 · 1 comment
Closed

In flask scrapetube is getting error please help #21

adarshchri opened this issue Jan 5, 2023 · 1 comment

Comments

@adarshchri
Copy link

from flask import Flask, jsonify
from flask_cors import CORS
import scrapetube

app = Flask(name)
CORS(app)

@app.route("/")
def hello_world():
return "Hello world"

@app.route('/name/string:song_name')
def search(song_name):
videoid = scrapetube.get_search(song_name , limit=1 , sleep=1)
for video in videoid:
return video["videoid"]

if name == "main":
app.run(debug=True)

91f833e8-f0f8-4d08-b09d-62364c19cf79

@adarshchri adarshchri changed the title In flask scrapetube is getting error please help :) In flask scrapetube is getting error please help :) @dermasmid Jan 5, 2023
@adarshchri adarshchri changed the title In flask scrapetube is getting error please help :) @dermasmid In flask scrapetube is getting error please help Jan 5, 2023
@adarshchri
Copy link
Author

I just slove it :)
In last
return "{}".format(video['videoId'])

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