Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
92 changes: 81 additions & 11 deletions EZA.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "code",
"execution_count": 219,
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -14,7 +14,7 @@
},
{
"cell_type": "code",
"execution_count": 220,
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -24,7 +24,7 @@
},
{
"cell_type": "code",
"execution_count": 221,
"execution_count": 3,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -33,14 +33,14 @@
},
{
"cell_type": "code",
"execution_count": 225,
"execution_count": 4,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"['6796', '4563978']\n"
"['6817', '4592410']\n"
]
}
],
Expand All @@ -57,16 +57,16 @@
},
{
"cell_type": "code",
"execution_count": 226,
"execution_count": 5,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"'2018-05-11T23:34:29.373558'"
"'2018-05-12T21:20:10.303833'"
]
},
"execution_count": 226,
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -78,7 +78,7 @@
},
{
"cell_type": "code",
"execution_count": 227,
"execution_count": 6,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -88,7 +88,7 @@
},
{
"cell_type": "code",
"execution_count": 229,
"execution_count": 7,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -126,7 +126,7 @@
" 'Unboxing and Reboxing the Nintendo Labo Piano! - Easy Update']"
]
},
"execution_count": 229,
"execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -142,6 +142,64 @@
"titles"
]
},
{
"cell_type": "code",
"execution_count": 71,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"['18,376',\n",
" '5,451',\n",
" '5,052',\n",
" '3,704',\n",
" '10,459',\n",
" '11,420',\n",
" '17,949',\n",
" '9,802',\n",
" '10,769',\n",
" '29,229',\n",
" '9,276',\n",
" '9,911',\n",
" '8,269',\n",
" '27,412',\n",
" '4,187',\n",
" '12,498',\n",
" '33,611',\n",
" '33,468',\n",
" '9,122',\n",
" '17,393',\n",
" '30,464',\n",
" '6,956',\n",
" '29,780',\n",
" '10,756',\n",
" '22,782',\n",
" '15,200',\n",
" '5,641',\n",
" '106,841',\n",
" '14,216',\n",
" '20,475']"
]
},
"execution_count": 71,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"video_counter = eza_soup.find_all('ul', attrs = {'class': 'yt-lockup-meta-info'})\n",
"views = []\n",
"\n",
"for view in video_counter:\n",
" view_content = view.contents[0]\n",
" numbers = re.findall(r'\\b\\d+\\b', str(view_content))\n",
" x = \",\".join(numbers)\n",
" views.append(x)\n",
" \n",
"views"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand All @@ -155,6 +213,18 @@
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.4"
}
},
"nbformat": 4,
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ A short script to deploy to AWS to monitor the total number of patrons and Patre
2. Store and append results somewhere
3. Deliver results somehow (email?)
4. Better name
5. Record views and likes of videos
5. Record views (need to add notebook code to script) and likes of videos
6. Do something with video duration?