L
L
Leks22019-04-04 09:50:21
Java
Leks2, 2019-04-04 09:50:21

How to check if a youtube video exists?

For example, there is an input field for a link, the user enters and clicks add, and if the video exists, it returns true

Answer the question

In order to leave comments, you need to log in

2 answer(s)
N
nvdfxx, 2019-04-04
@nvdfxx

You send a request to this link, you receive a status 404 or 200, based on this you make the necessary callback

O
Oleg, 2019-04-04
@402d

1. regularly check that the url refers to the video
2. you can separately or combine with 1 , get the video id
3. pull asynchronously api video hosting (get information about the video)
4a add
4b notify about an error

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question