Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- html = http.get("https://www.googleapis.com/youtube/v3/channels?part=statistics&id=YOUR CHANNEL ID&key=YOUR API KEY")
- --Replace 'YOUR CHANNEL ID' with the real thing as well as 'YOUR API KEY'
- body = html.readAll()
- mins = string.find(body, "subscriber")
- maxs = string.find(body, "hidden")
- subscribers = string.sub(body,mins+19,maxs-9)
- print("Subscribers: "..subscribers)
- --Subscrubers
- mins2 = string.find(body, "view")
- maxs2 = string.find(body, "comment")
- view = string.sub(body,mins2+13,maxs2-9)
- print("View: "..view)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement