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

Fetch youtube video meta data #8

Open
mohitkh7 opened this issue Dec 4, 2018 · 7 comments
Open

Fetch youtube video meta data #8

mohitkh7 opened this issue Dec 4, 2018 · 7 comments
Labels
API enhancement New feature or request Hard

Comments

@mohitkh7
Copy link
Owner

mohitkh7 commented Dec 4, 2018

Write a script based on Youtube API's to fetch meta data such as likes, dislikes, views, length etc. of youtube video. On adding youtube video resources this script should all fetch relevant data and populate resources fields.

@mohitkh7 mohitkh7 added enhancement New feature or request Hard API labels Dec 4, 2018
@vedangj044
Copy link

I think instead of using the youtube API . We can use Web-scrapers to fetch the required data.
Beautiful Soup can do this work for us, efficiently.

@vedangj044
Copy link

https://stackoverflow.com/questions/32940484/how-to-retrieve-like-dislike-view-count-from-youtube

This guy managed to extract the likes from any Youtube Video.

The code used is

import re, requests
filesInChannel = ["https://www.youtube.com/watch?v=TcdEOHV3PgA"]
def getStats(link):
page = requests.get(link)
likes = re.search("with (\d*.\d*.\d*)", page.text).group(1)
title = re.search("property=\"og:title\" content=\"([^\n]*)", page.text).group(1)
return (likes, title)
for link in filesInChannel:
stats = getStats(link)
print(str(stats[0].encode("utf-8")) + " " + str(stats[1].encode("utf-8")))

@mohitkh7 mohitkh7 reopened this Dec 31, 2018
@mohitkh7
Copy link
Owner Author

partially solved in PR #39 merged as commit 315a70f

@LordGameleo
Copy link

Can I work on this issue.... I have worked on something related to fetching data from youtube

@LordGameleo
Copy link

https://github.com/LordGameleo/Python-Projects/blob/master/youtube.py
check this.... in this we will just have to change the information we want to get from json object...... and remove the part where it starts the browser

@mohitkh7
Copy link
Owner Author

@LordGameleo Yes, Assigned to you

@LordGameleo
Copy link

@mohitkh7 what exactly do you want?....... what all details you want to fetch...... and do you want to stick with api use or will web scrapping work too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API enhancement New feature or request Hard
Projects
None yet
Development

No branches or pull requests

3 participants