I
I
Ivan Petrov2016-10-18 20:00:19
Parsing
Ivan Petrov, 2016-10-18 20:00:19

How to parse only unique videos from Youtube?

The task is this: You need to parse videos from Youtube, most likely just links, write them to the database.
Then, when displaying posts on the site, the link is simply substituted into the embed code.
How can I only parse unique videos? If I want to parse and publish 10 videos per day for a specific keyword, it will find the same videos, so the videos that are already in the database should be skipped.
How to implement it? Check each link, look for it in the database? What if there are 100,000 records in the database?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
K
Kirill Zhilyaev, 2016-10-18
@kirill_782

Use the YouTube API, or parse the id regularly, and look at the presence in the database before adding it.

A
Alexey, 2016-10-18
@alsopub

Normally, everything should be with 100000 records, if the video ID is a separate column with an index on this column.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question