-
Notifications
You must be signed in to change notification settings - Fork 5
/
create_db.py
42 lines (37 loc) · 932 Bytes
/
create_db.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/usr/bin/python
import sqlite3
conn = sqlite3.connect('youtube.db')
print "Opened database successfully";
conn.execute('''CREATE TABLE VIDEOS
(videoId INT PRIMARY KEY NOT NULL,
channelId INT,
channelTitle TEXT,
title TEXT,
description TEXT,
categoryId INT,
publishedAt INT,
currentTime INT,
life INT,
definition TEXT,
caption INT,
duration INT,
durationCategory TEXT,
licensedContent TEXT,
dimension INT,
allowed TEXT,
allowedCount INT,
recordingDate INT,
latitude INT,
longitude INT,
publicStatsViewable INT,
privacyStatus INT,
license TEXT,
embeddable INT,
commentCount INT,
viewCount INT,
favoriteCount INT,
dislikeCount INT,
likeCount INT);''')
print "Table created successfully";
conn.commit()
conn.close()