GithubHelp home page GithubHelp logo

adityasaxena26 / youtube-insight Goto Github PK

View Code? Open in Web Editor NEW

This project forked from computationalmedia/youtube-insight

0.0 2.0 0.0 33 KB

An integrated YouTube data crawler.

License: MIT License

Python 100.00%

youtube-insight's Introduction

YouTube-insight

An integrated YouTube data crawler

YouTube-insight is a tool to crawl video metadata and historical data for YouTube videos, and first used to construct datasets in the following paper,

Siqi Wu, Marian-Andrei Rizoiu, and Lexing Xie. Beyond Views: Measuring and Predicting Engagement in Online Videos. AAAI International Conference on Weblogs and Social Media (ICWSM), 2018. [ paper | code | data | slides ]

Installation

Install from source, run

git clone https://github.com/avalanchesiqi/youtube-insight.git
cd youtube-insight
python setup.py install

Python packages version

All codes are developed and tested in Python 3.6, along with google-api-python-client 1.6.5, urllib3 1.22 and googletrans 2.3.0.

Code usage

An simple example is given below:

import json
from youtube_insight.crawler import Crawler

insight_crawler = Crawler()
d_key = 'Set your own developer key!'
parts = 'snippet,statistics,topicDetails,contentDetails'
insight_crawler.set_key(d_key)
insight_crawler.set_parts(parts)

vid = 'ITtlxjvLQis'
video_data = insight_crawler.crawl_insight_data(vid)
print(json.dumps(video_data, indent=4, sort_keys=True))

Before using this YouTube-insight crawler, you need to register your Google developer key and set it in the d_key field.

We also provide a quickstart script that handles input and output from text files in example.py. It's so easy to use -- you provide an input file then we take care of everything! The two main functions you can utilize directly are:

  1. Given a list of YouTube channel ID, crawl all video IDs.
  2. Given a list of YouTube video ID, crawl all video insight data.

Some argparse options:

  • '-i' / '--input': input file path of video ids or channel ids, required=True
  • '-o' / '--output': output file path of video data or channel video list, required=True
  • '-c' / '--channel': input a list of channel IDs or not, default=False
  • '-r' / '--relevant': retrieve relevant videos from YouTube API or not, default=False

Given a list of YouTube channel ID, crawl all video IDs

Code usage

python example.py -i data/channel_ids.txt -o data/channel_videos.json -c

Each line is the information of a YouTube channel in json format, an example is shown below, in which the channelVideos field lists all video IDs from requested channel.

{
   "channelId": "UC004_RYu6VWmOaM4PhwQSwg",
   "snippet": {
      "publishedAt": "2011-06-01T15:17:18.000Z",
      "description": "",
      "thumbnails": "https://yt3.ggpht.com/-AnUftzhIf_U/AAAAAAAAAAI/AAAAAAAAAAA/4OHWA4f05hg/s88-c-k-no-mo-rj-c0xffffff/photo.jpg",
      "title": "RenzJulianVEVO"
   },
   "statistics": {
      "viewCount": "59355",
      "commentCount": "2",
      "subscriberCount": "131",
      "hiddenSubscriberCount": false,
      "videoCount": "20"
   },
   "channelVideos": ["nXJQZSKJh4M", "Trz_RKPGL9U", "X_MJGbZ8Jwg", "4igq0hrvjME", "_YrZw8sIlok", "Fgrxb-keVgw", "uFgk8oTu5Cs", "U_zN8Tu0UDY", "Ohi6QmgMRUA", "ZZ3H-78vE9U", "oE4oxm7DjQI", "su8SVq9t8lU", "aukKxO0obmw", "Bc2k7r_BYVI", "5v-4ZlWF-OI", "xplhYpu54oc", "yI2aEIbE4RI", "seO9R6CUgm0", "7ZpQjo9QXSg", "LO7YJQEoFn0"]
}

Given a list of YouTube video ID, crawl all video insight data

Code usage

python example.py -i data/video_ids.txt -o data/video_insights.json -r

Each line is a YouTube video in json format, an example is shown below, in which the relevantVideos field lists all relevant video IDs returned by YouTube API.

{
   "id": "XnQn7nt-U_Q",
   "snippet":{
      "publishedAt": "2016-07-29T15:03:21.000Z",
      "channelId": "UCPJevK3WjujoP0HKP8P5C2g",
      "title": "Lana Lyric - She Don't Need Nobody ft. Zyrel",
      "description": "Music video for She Don't Need Nobody ft Zyrel performed by Lana Lyric.\n\nhttp://www.rewiredmusicgroup.com\n\nCopyright (C) 2016 Rewired Music Group.\n\nhttp://vevo.ly/1JeBj4",
      "thumbnails": "https://i.ytimg.com/vi/XnQn7nt-U_Q/default.jpg",
      "channelTitle": "LanaLyricVEVO",
      "tags": ["vydia", "music", "music video", "She Don't Need Nobody", "Lana Lyric", "Zyrel", "Rap/Hip-Hop", "Single", "2016", "Rewired Music Group", "Peejay Svoboda", "vevo"],
      "categoryId": "10",
      "detectLanguage": "en"
   },
   "contentDetails": {
      "duration": "PT4M",
      "definition": "hd",
      "caption": "false",
      "licensedContent": true
   },
   "statistics": {
      "viewCount": "1343",
      "likeCount": "15",
      "dislikeCount": "1",
      "favoriteCount": "0",
      "commentCount": "4"
   },
   "topicDetails":{
      "relevantTopicIds": ["/m/0glt670", "/m/04rlf", "/m/04rlf", "/m/0glt670"],
      "topicCategories": ["https://en.wikipedia.org/wiki/Music", "https://en.wikipedia.org/wiki/Hip_hop_music"]
   },
   "insights": {
      "startDate": "2016-07-29", 
      "days": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 35, 36, 37, 38, 39, 40, 41, 43, 44, 45, 46, 47, 48, 49, 50, 51, 53, 55, 56, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 75, 77, 78, 79, 80, 81, 82, 83, 85, 86, 87, 88, 89, 90, 91, 92, 94, 95, 96, 97, 98, 99, 100, 102, 104, 106, 109, 110, 112, 113, 114, 115, 116, 117, 119, 120, 121, 123, 124, 125, 126, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 147, 148, 149, 150, 151, 153, 154, 155, 156, 157, 158, 159, 160, 161, 164, 165, 166, 167, 168, 169, 170, 171, 172, 174, 175, 176, 177, 178, 180, 182, 183, 184, 185, 186, 189, 190, 191, 193, 194, 195, 196, 197, 198, 199, 201, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 222, 223, 224, 225, 226, 227, 228, 229, 230, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 257, 258, 259, 260, 261, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 276, 277, 278, 279, 281, 282, 283, 284, 286, 287, 288, 290, 291, 292, 294, 295, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 313, 316, 317, 318, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 338, 339, 340, 341, 343, 344, 345, 346, 347, 348, 351, 352, 353, 355, 356, 358, 359, 360, 361, 363, 364, 365, 366, 367, 368, 369, 370, 373, 374, 376, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 415, 417, 419, 420, 421, 423, 424, 426, 427, 428, 429, 431, 433, 434, 436, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 453, 454, 455, 458, 460, 461, 463, 464, 467, 468, 470, 472, 473, 474, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 509, 510, 511, 512, 513, 515, 516, 517, 518, 519, 520, 521, 523, 524, 525, 527, 529, 530, 531, 532, 534, 535, 536, 538, 540, 541, 542, 543, 544, 545, 547, 548, 549, 550, 552, 553, 554, 555, 556, 559, 561, 562, 564, 565, 566, 567, 568, 570, 571, 572, 573, 574, 575, 576, 577, 578, 580],
      "dailyView": [4, 3, 19, 20, 26, 6, 10, 9, 5, 5, 23, 23, 7, 2, 7, 13, 7, 5, 4, 1, 4, 3, 3, 5, 3, 3, 8, 4, 4, 4, 1, 3, 3, 3, 2, 5, 2, 1, 4, 3, 5, 1, 4, 2, 3, 1, 1, 1, 3, 3, 1, 1, 1, 1, 2, 2, 3, 2, 4, 9, 6, 4, 2, 1, 1, 2, 2, 3, 1, 3, 4, 3, 1, 7, 2, 1, 2, 2, 4, 1, 1, 1, 3, 1, 4, 1, 4, 3, 2, 1, 7, 3, 3, 3, 4, 3, 3, 2, 1, 6, 17, 5, 3, 3, 3, 2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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0],
      "totalShare": 18,
      "dailyWatch": [11.4, 4.4, 29.35, 20.05, 60.2833333333, 2.75, 24.9666666667, 14.95, 9.25, 11.7166666667, 50.75, 43.75, 10.25, 4.4, 2.05, 12.6666666667, 5.78333333333, 14.4166666667, 1.86666666667, 0.233333333333, 2.11666666667, 0.516666666667, 2.75, 1.96666666667, 1.23333333333, 4.13333333333, 7.31666666667, 9.05, 0.9, 2.7, 0.216666666667, 0.85, 3.45, 0.4, 0.35, 1.9, 3.16666666667, 0.0333333333333, 3.56666666667, 1.36666666667, 4.4, 3.98333333333, 1.68333333333, 5.41666666667, 8.03333333333, 0.2, 0.166666666667, 3.88333333333, 4.66666666667, 7.65, 0.15, 1.46666666667, 2.85, 0.05, 0.35, 4.28333333333, 0.783333333333, 0.116666666667, 8.71666666667, 8.9, 1.56666666667, 3.8, 0.683333333333, 0.05, 0.366666666667, 4.25, 6.6, 5.1, 0.366666666667, 1.3, 8.61666666667, 1.23333333333, 3.98333333333, 3.76666666667, 2.8, 3.93333333333, 1.28333333333, 1.06666666667, 1.35, 0.183333333333, 1.41666666667, 1.65, 0.933333333333, 0.683333333333, 3.33333333333, 0.05, 1.33333333333, 1.05, 0.266666666667, 0.266666666667, 5.9, 0.3, 0.766666666667, 0.616666666667, 4.43333333333, 4.56666666667, 2.71666666667, 4.26666666667, 1.05, 6.15, 45.65, 6.35, 0.283333333333, 1.46666666667, 1.33333333333, 1.2, 4.28333333333, 23.5666666667, 1.1, 1.36666666667, 0.75, 4.45, 1.05, 5.5, 0.35, 1.61666666667, 2.48333333333, 0.733333333333, 0.0666666666667, 1.95, 0.833333333333, 1.03333333333, 3.68333333333, 5.0, 2.41666666667, 2.06666666667, 3.11666666667, 1.26666666667, 0.7, 0.3, 0.0166666666667, 0.283333333333, 0.3, 0.366666666667, 0.266666666667, 1.2, 0.7, 3.0, 1.28333333333, 0.133333333333, 1.61666666667, 5.31666666667, 1.66666666667, 0.183333333333, 1.53333333333, 0.25, 0.8, 0.133333333333, 0.65, 0.6, 1.01666666667, 0.0333333333333, 0.0, 0.466666666667, 0.616666666667, 1.45, 0.683333333333, 1.7, 0.333333333333, 0.6, 3.68333333333, 0.0666666666667, 4.3, 12.2666666667, 0.3, 0.516666666667, 0.416666666667, 0.6, 0.05, 0.316666666667, 0.266666666667, 0.15, 0.283333333333, 0.916666666667, 0.4, 0.116666666667, 1.6, 0.0666666666667, 0.8, 0.233333333333, 1.11666666667, 0.1, 6.55, 1.1, 0.383333333333, 0.4, 0.85, 20.25, 1.53333333333, 0.116666666667, 0.716666666667, 0.0, 0.833333333333, 1.61666666667, 0.483333333333, 5.9, 1.5, 0.616666666667, 4.76666666667, 0.45, 0.633333333333, 0.333333333333, 3.05, 1.8, 0.0666666666667, 1.9, 9.81666666667, 1.11666666667, 3.26666666667, 0.733333333333, 0.0666666666667, 0.35, 0.233333333333, 0.516666666667, 5.46666666667, 2.2, 0.116666666667, 1.36666666667, 0.333333333333, 0.15, 1.2, 0.316666666667, 0.616666666667, 3.13333333333, 0.966666666667, 3.81666666667, 0.05, 0.266666666667, 0.233333333333, 3.4, 0.316666666667, 0.333333333333, 2.78333333333, 2.81666666667, 0.3, 0.266666666667, 0.3, 2.46666666667, 0.0, 3.98333333333, 2.93333333333, 0.95, 0.166666666667, 0.433333333333, 1.78333333333, 0.65, 0.45, 1.6, 0.3, 1.1, 3.83333333333, 0.0666666666667, 0.116666666667, 0.85, 4.96666666667, 4.93333333333, 0.283333333333, 3.85, 0.783333333333, 2.2, 0.4, 0.2, 6.41666666667, 4.3, 1.2, 1.23333333333, 0.05, 2.9, 0.616666666667, 1.06666666667, 1.1, 0.95, 0.383333333333, 0.883333333333, 0.233333333333, 0.216666666667, 0.383333333333, 0.3, 0.15, 1.36666666667, 0.283333333333, 0.1, 0.233333333333, 1.13333333333, 0.683333333333, 0.716666666667, 4.76666666667, 0.0333333333333, 0.2, 0.35, 10.5333333333, 0.316666666667, 0.483333333333, 0.283333333333, 0.466666666667, 1.4, 0.75, 0.45, 1.05, 0.483333333333, 2.86666666667, 0.45, 0.55, 0.183333333333, 1.66666666667, 0.866666666667, 1.83333333333, 0.116666666667, 0.95, 0.1, 1.13333333333, 3.38333333333, 1.5, 0.45, 0.1, 2.03333333333, 0.0333333333333, 0.966666666667, 4.93333333333, 0.133333333333, 0.683333333333, 0.233333333333, 3.53333333333, 0.416666666667, 0.133333333333, 0.333333333333, 0.816666666667, 0.883333333333, 0.333333333333, 2.21666666667, 0.116666666667, 0.1, 0.266666666667, 0.25, 0.233333333333, 0.1, 0.116666666667, 1.11666666667, 3.1, 7.21666666667, 1.98333333333, 0.266666666667, 5.1, 0.3, 0.3, 3.78333333333, 0.0833333333333, 0.616666666667, 0.0666666666667, 0.4, 0.05, 6.05, 0.6, 1.33333333333, 2.68333333333, 0.683333333333, 0.9, 0.55, 0.9, 0.566666666667, 0.816666666667, 0.55, 0.8, 0.0333333333333, 4.63333333333, 1.01666666667, 0.9, 0.816666666667, 0.733333333333, 0.516666666667, 1.91666666667, 0.483333333333, 0.283333333333, 0.116666666667, 0.3, 1.1, 0.416666666667, 0.4, 0.583333333333, 0.733333333333, 0.733333333333, 0.483333333333, 0.9, 0.0666666666667, 0.0666666666667, 0.7, 2.93333333333, 0.2, 0.2, 3.53333333333, 0.15, 4.15, 4.45, 2.23333333333, 0.5, 1.01666666667, 0.633333333333, 0.35, 1.11666666667, 0.3, 1.5, 0.5, 1.13333333333, 1.28333333333, 3.78333333333, 0.166666666667, 2.76666666667, 1.11666666667, 0.383333333333, 0.55, 2.38333333333, 0.6, 0.3, 0.5, 0.233333333333, 24.6166666667, 4.5, 1.11666666667, 0.933333333333, 0.266666666667, 0.133333333333, 1.31666666667, 0.666666666667, 0.2, 0.0, 4.7, 0.683333333333, 0.333333333333, 0.766666666667, 0.116666666667, 0.3, 0.2, 0.616666666667, 0.55, 1.48333333333, 4.31666666667, 0.0, 0.333333333333, 0.666666666667, 0.7, 0.316666666667, 0.3, 2.5, 0.45, 0.25, 0.0833333333333, 3.96666666667, 0.316666666667, 0.65, 0.05, 0.316666666667, 0.6, 0.916666666667, 0.0833333333333, 0.416666666667, 0.15, 3.7, 1.58333333333, 1.53333333333, 6.43333333333, 3.01666666667, 0.783333333333, 1.78333333333, 0.4, 1.61666666667, 6.26666666667, 0.816666666667, 0.616666666667, 0.0333333333333, 0.3, 1.16666666667, 0.966666666667, 0.05, 0.25, 0.766666666667, 2.01666666667, 1.46666666667, 0.0, 0.416666666667, 0.216666666667, 1.11666666667, 1.85, 4.5], 
      "avgWatch": 0.8616044776120957,
      "dailySubscriber": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
      "totalSubscriber": 1
   },
   "relevantVideos": ["nxlcbPh6uns", "PT2_F-1esPk", "mNT_WyRcVJU", "EW1dLymlm3s", "B56IBLlZyuk", "KEI4qSrkPAs", "sg34LyfYobo", "6ZKbEGzvub0", "6fBZBntjEOA", "5GL9JoH4Sws", "7fKHkT1_VyI", "Gb0zSG0kwZ8", "1Vn1BXfsd4Q", "bMpFmHSgC4Q", "h-HbNph19k0", "ES9zCvZsb40", "dUBW_Y9-UAU", "P7WO0I3qKzw", "dHcfpzTxJi8", "1y6smkh6c-0", "nYh-n7EOtMA", "3v5HZTwFBCs", "YBbUQ8NBnok", "EbhsbLeq-xg", "42CRTZ_GHV8", "6CnP8ghhZPQ", "l06PgBJWZqk", "PkWotCFXQc0", "Du5-zXZyWaE", "4VG9WDSaWN0", "nGomTkNhEW0", "ikz6Iwo4lJM", "gJpAR_YwrFU", "_4cGX4KogyY", "Su92XV3J-oA", "DyIIe0t_RwY", "JesZWS0att8", "4LwRqByQ5h4", "nMIoAJRgYVE", "7_tSinRVwU8", "ejkP7y-VtqE", "HXeYRs_zR6w", "QTXqOdaVwQ4", "TW-pxuxjd3c"]
}

defaultLanguage/detectLanguage field

Some videos have defaultLanguage returned by YouTube API, but some don't. If not, we use googletrans 2.3.0 to detect a language from video title and description.

Change log

2018-08-09

  1. Remove the force field in argparse, now you can append to existing output file without worrying about rewriting.
  2. Change the languageDetector from langdetect 1.0.7 to googletrans 2.3.0.

youtube-insight's People

Contributors

avalanchesiqi avatar

Watchers

James Cloos avatar Aditya Saxena avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.