\n",
"\n",
"\n",
"\n",
"Search\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"Videos\n",
"Social Media\n",
"Tech\n",
"Business\n",
"Entertainment\n",
"World\n",
"Lifestyle\n",
"Watercooler\n",
"Shop\n",
"\n",
"More\n",
"\n",
"\n",
"Channels\n",
"Videos\n",
"Social Media\n",
"Tech\n",
"Business\n",
"Entertainment\n",
"World\n",
"Lifestyle\n",
"Watercooler\n",
"Shop\n",
"CompanyAbout UsLicensing & ReprintsArchiveMashable Careers\n",
"ContactContact UsSubmit News\n",
"AdvertiseAdvertise\n",
"LegalPrivacy PolicyTerms of UseCookie Policy\n",
"AppsiPhone / iPadAndroid\n",
"ResourcesSubscriptions\n",
"SitesMashable ShopJob BoardSocial Good SummitMedia Summit\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"World\n",
"\n",
"\n",
"Like\n",
"Follow\n",
"Follow\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"Chicago man appears to stream his own shooting on Facebook\n",
"\n",
"\n",
"1.5k\n",
"Shares\n",
"\n",
"\n",
"Share\n",
"Tweet\n",
"Share\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"What's This?\n",
"\n",
"\n",
"A man is seen firing a gun in a Facebook Live video reportedly taken in Chicago.Image: Facebook\n",
"By Brian Ries2016-04-01 23:26:01 UTC\n",
"\n",
"\n",
"\n",
"I guess it was only a matter of time.\n",
"Chicago Police are investigating an extraordinary video that appears to capture the shooting of a man while he was streaming on Facebook Live.\n",
"Watch the video (graphic content):\n",
"\n",
"\n",
"\n",
"\n",
"Damn he was on LIVE talking shit with no burner and got his life took smds shit crazy . #LITERALLY\n",
"Posted by TcWorld Creamer on Thursday, March 31, 2016\n",
"\n",
"\n",
"In the clip, which was re-recorded from its original source on Thursday and disseminated widely, a man in a blue Chicago White Sox hat is seen talking into the camera while standing in front of Scott's Convenience Store in Chicago's West Englewood neighborhood.\n",
"He jokes that the store is open because he needed \"somewhere to duck and hide for cover.\"\n",
"\n",
"Scott's Convenience Store is seen in the Facebook video and on Google Street View.Image: google/facebookMoments later, shots ring out and the phone drops to the street, camera up. The apparent assailant, wearing red, then steps into the frame and continues firing the gun elsewhere.\n",
"A minute passes and a woman begins screaming, “Oh my God, no! I can’t believe this.\"\n",
"While many people have questioned the video's authenticity, especially as it surfaced in the hours before April Fools' Day, Chicago Police say it's likely legitimate.\n",
"\"CPD is aware of the social media video in question and suspect the video is connected to the incident,\" Officer Kevin Quaid, with the Office of News Affairs, told Mashable. \n",
"SEE ALSO: 1941 Chicago streets through the lens of a rookie FSA photographer\n",
"He added that detectives were working to confirm its authenticity, but that a man, 31, was shot on Thursday at the location seen in the video and transported to Mount Sinai hospital in critical condition.\n",
"Detectives are waiting to speak with the apparent victim, who is now under sedation, The Associated Press reported.\n",
"The victim is believed to be a known gang member.\n",
"Peter Nickeas, a Chicago Tribune reporter who wrote about the video, tweeted that police are privately a lot more confident than their official statements suggest.\n",
"\n",
"Video is probably real but important (essential, IMO) to make sure it's real, not just that it couldn't conceivably be fake.\n",
"— Peter Nickeas (@PeterNickeas) April 1, 2016\n",
"\n",
"\"Video is probably real but important (essential, IMO) to make sure it's real, not just that it couldn't conceivably be fake,\" he said. \"Police are privately more confident (a lot more) in the video's authenticity than the CPD news affairs statement lets on.\"\n",
"If it proves to be real, this would probably be a first for the live video product Facebook CEO Mark Zuckerberg is reportedly \"obsessed\" with.\n",
"The shocking video comes as numerous news organizations have embraced the medium, which has been used to stream live scenes from protests, political events and average life.\n",
"Violence in Chicago is reaching levels \"unseen in years,\" according to the Tribune, with shootings up 73% over this time last year. More than 700 people have been shot in the year's first quarter.\n",
"The suspected shooter in Thursday's incident is still at large.\n",
"Have something to add to this story? Share it in the comments.\n",
"\n",
" window._msla=window.loadScriptAsync||function(src,id){if(document.getElementById(id))return;var js=document.createElement('script');js.id=id;js.src=src;document.getElementsByTagName('script')[0].parentNode.insertBefore(js,fjs);};\n",
"_msla(\"//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.3\",\"facebook-jssdk\");_msla(\"//platform.twitter.com/widgets.js\",\"twitter_jssdk\");\n",
"\n",
"\n",
"\n",
"Topics:\n",
"Chicago, Facebook, facebook live, shooting, World\n",
"\n",
"\n",
"\n",
"Image: Facebook\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
" if(window.pageChanged)\n",
" window.omni({\"channel\":\"world\",\"content_type\":\"article\",\"v_buy\":null,\"v_buy_i\":null,\"h_pub\":16.0,\"h_buy\":null,\"h_pub_buy\":null,\"v_cur\":0.1,\"v_max\":0.1,\"v_cur_i\":0,\"v_max_i\":0,\"events\":\"event51,event61\",\"top_channel\":\"world\",\"content_source_type\":\"Internal\",\"content_source_name\":\"Internal\",\"author_name\":\"Brian Ries\",\"age\":\"0\",\"pub_day\":1,\"pub_month\":4,\"pub_year\":2016,\"pub_date\":\"04/01/2016\",\"sourced_from\":\"Internal\",\"isPostView\":true,\"post_lead_type\":\"Alt Image Lead\",\"topics\":\"Chicago,Facebook,facebook live,shooting,World\",\"campaign\":null,\"display_mode\":null,\"viral_video_type\":null,\"b_flag\":false});\n",
" metaData = {\"link\":[[\"canonical\",\"http://mashable.com/2016/04/01/facebook-live-shooting/\"],[\"image_src\",\"http://rack.3.mshcdn.com/media/ZgkyMDE2LzA0LzAxL2QzL3Nob290ZXIuYWQwNjUuanBnCnAJdGh1bWIJMTIwMHg2MjcjCmUJanBn/764bc2c7/1d6/shooter.jpg\"]],\"meta_property\":[[\"og:url\",\"http://mashable.com/2016/04/01/facebook-live-shooting/\"],[\"og:title\",\"Chicago man appears to stream his own shooting on Facebook\"],[\"og:type\",\"article\"],[\"og:site_name\",\"Mashable\"],[\"og:description\",\"Chicago Police are investigating an extraordinary video that appears to capture the shooting of a man while he was streaming on Facebook Live.\"],[\"og:image\",\"http://rack.0.mshcdn.com/media/ZgkyMDE2LzA0LzAxL2QzL3Nob290ZXIuYWQwNjUuanBnCnAJdGh1bWIJMTIwMHg2MzAKZQlqcGc/13367dc7/1d6/shooter.jpg\"],[\"og:article:published_time\",\"2016-04-01T23:26:01Z\"],[\"og:article:modified_time\",\"2016-04-01T23:45:00Z\"],[\"og:article:publisher\",\"https://www.facebook.com/mashable\"]],\"meta_name\":[[\"description\",\"Chicago Police are investigating an extraordinary video that appears to capture the shooting of a man while he was streaming on Facebook Live.\"],[\"keywords\",\"chicago, shooting, facebook-live, facebook, world\"],[\"twitter:title\",\"Chicago man appears to stream his own shooting on Facebook\"],[\"twitter:description\",\"I guess it was only a matter of time.\\n\"],[\"twitter:image\",\"http://rack.0.mshcdn.com/media/ZgkyMDE2LzA0LzAxL2QzL3Nob290ZXIuYWQwNjUuanBnCnAJdGh1bWIJNTYweDc1MAplCWpwZw/5cd68b1a/1d6/shooter.jpg\"],[\"twitter:site\",\"@mashable\"],[\"twitter:via\",\"mashable\"],[\"twitter:url\",\"http://mashable.com/2016/04/01/facebook-live-shooting/\"],[\"twitter:creator\",\"@mashable\"],[\"twitter:card\",\"photo\"],[\"twitter:image:width\",\"560\"],[\"twitter:image:height\",\"750\"],[\"date\",\"2016-04-01 23:26:01 UTC\"],[\"sailthru.author\",\"Brian Ries\"],[\"sailthru.image.thumb\",\"http://rack.2.mshcdn.com/media/ZgkyMDE2LzA0LzAxL2QzL3Nob290ZXIuNmJjOTMuanBnCnAJdGh1bWIJMTE1eDExNSMKZQlqcGc/7f31eddf/9f6/shooter.jpg\"],[\"sailthru.image.full\",\"http://rack.3.mshcdn.com/media/ZgkyMDE2LzA0LzAxL2QzL3Nob290ZXIuNmJjOTMuanBnCnAJdGh1bWIJOTUweDUzNCMKZQlqcGc/8f2db68b/9f6/shooter.jpg\"],[\"sailthru.lead_image\",\"http://rack.1.mshcdn.com/media/ZgkyMDE2LzA0LzAxL2QzL3Nob290ZXIuNmJjOTMuanBnCnAJdGh1bWIJNjAweDMzOCMKZQlqcGc/238675fe/9f6/shooter.jpg\"],[\"sailthru.secondary_image\",\"http://rack.3.mshcdn.com/media/ZgkyMDE2LzA0LzAxL2QzL3Nob290ZXIuNmJjOTMuanBnCnAJdGh1bWIJMjg4eDE2MiMKZQlqcGc/6a8e55f0/9f6/shooter.jpg\"],[\"sailthru.exclude_homepage\",false],[\"sailthru.exclude_uk\",false],[\"sailthru.exclude_australia\",false],[\"sailthru.exclude_india\",false],[\"author\",\"Brian Ries\"]],\"short_url\":[[\"short_url\",\"http://on.mash.to/1pSuJjr\"]]};\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"Load Comments\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"What's Hot\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"More in World\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"What's New\n",
"\n",
"\n",
"What's Rising\n",
"\n",
"\n",
"What's Hot\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"What's New\n",
"What's Rising\n",
"What's Hot\n",
"\n",
"\n",
"\n",
"\n",
" (function(){\n",
" loadScriptAsync(\"//platform.twitter.com/oct.js\", \"twitteroct\")\n",
" var timer;\n",
" timer = every(500, function() {\n",
" if ((typeof twttr !== \"undefined\" && twttr !== null) && (twttr.conversion != null)) {\n",
" clearInterval(timer);\n",
" return twttr.conversion.trackPid('l4o6d');\n",
" }\n",
" });\n",
" }());\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
" if(window.initPage) { window.initPage() }\n",
" else { $(function() { window.initPage(); })}\n",
"\n",
"\n",
"About UsJobsAdvertiseSubscribePrivacyTerms\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"Mashable\n",
"\n",
"is a global, multi-platform media and entertainment company. Powered by its own proprietary technology, Mashable is the go-to source for tech, digital culture and entertainment content for its dedicated and influential audience around the globe.\n",
"\n",
"\n",
"\n",
"©2005-2016\n",
"Mashable, Inc.\n",
"\n",
"\n",
"Reproduction without explicit permission is prohibited. All Rights Reserved.\n",
"\n",
"\n",
"Designed in collaboration with Code & Theory\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
" window.detectStaffEditableLink();\n",
"\n",
"\n",
"\n",
"\n"
]
}
],
"source": [
"print(soup.get_text())"
]
},
{
"cell_type": "code",
"execution_count": 24,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"try:\n",
" text = str(soup.get_text()).split(\"UTC\\n\\n\\n\")[1]\n",
"except IndexError:\n",
" text = str(soup.get_text()).split(\"Analysis\\n\\n\")[1]\n",
"\n",
"text = text.split('Have something to add to this story?')[0]"
]
},
{
"cell_type": "code",
"execution_count": 25,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"I guess it was only a matter of time.\n",
"Chicago Police are investigating an extraordinary video that appears to capture the shooting of a man while he was streaming on Facebook Live.\n",
"Watch the video (graphic content):\n",
"\n",
"\n",
"\n",
"\n",
"Damn he was on LIVE talking shit with no burner and got his life took smds shit crazy . #LITERALLY\n",
"Posted by TcWorld Creamer on Thursday, March 31, 2016\n",
"\n",
"\n",
"In the clip, which was re-recorded from its original source on Thursday and disseminated widely, a man in a blue Chicago White Sox hat is seen talking into the camera while standing in front of Scott's Convenience Store in Chicago's West Englewood neighborhood.\n",
"He jokes that the store is open because he needed \"somewhere to duck and hide for cover.\"\n",
"\n",
"Scott's Convenience Store is seen in the Facebook video and on Google Street View.Image: google/facebookMoments later, shots ring out and the phone drops to the street, camera up. The apparent assailant, wearing red, then steps into the frame and continues firing the gun elsewhere.\n",
"A minute passes and a woman begins screaming, “Oh my God, no! I can’t believe this.\"\n",
"While many people have questioned the video's authenticity, especially as it surfaced in the hours before April Fools' Day, Chicago Police say it's likely legitimate.\n",
"\"CPD is aware of the social media video in question and suspect the video is connected to the incident,\" Officer Kevin Quaid, with the Office of News Affairs, told Mashable. \n",
"SEE ALSO: 1941 Chicago streets through the lens of a rookie FSA photographer\n",
"He added that detectives were working to confirm its authenticity, but that a man, 31, was shot on Thursday at the location seen in the video and transported to Mount Sinai hospital in critical condition.\n",
"Detectives are waiting to speak with the apparent victim, who is now under sedation, The Associated Press reported.\n",
"The victim is believed to be a known gang member.\n",
"Peter Nickeas, a Chicago Tribune reporter who wrote about the video, tweeted that police are privately a lot more confident than their official statements suggest.\n",
"\n",
"Video is probably real but important (essential, IMO) to make sure it's real, not just that it couldn't conceivably be fake.\n",
"— Peter Nickeas (@PeterNickeas) April 1, 2016\n",
"\n",
"\"Video is probably real but important (essential, IMO) to make sure it's real, not just that it couldn't conceivably be fake,\" he said. \"Police are privately more confident (a lot more) in the video's authenticity than the CPD news affairs statement lets on.\"\n",
"If it proves to be real, this would probably be a first for the live video product Facebook CEO Mark Zuckerberg is reportedly \"obsessed\" with.\n",
"The shocking video comes as numerous news organizations have embraced the medium, which has been used to stream live scenes from protests, political events and average life.\n",
"Violence in Chicago is reaching levels \"unseen in years,\" according to the Tribune, with shootings up 73% over this time last year. More than 700 people have been shot in the year's first quarter.\n",
"The suspected shooter in Thursday's incident is still at large.\n",
"\n"
]
}
],
"source": [
"print(text)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Author information"
]
},
{
"cell_type": "code",
"execution_count": 26,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/html": [
"\n",
"
\n",
" "
],
"text/plain": [
"
"
]
},
"execution_count": 26,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# Only if author_web != []:\n",
"from IPython.display import IFrame\n",
"IFrame(author_web, 600, 600)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Binary features if author is on: Facebook, LinkedIn, Twitter, Google+"
]
},
{
"cell_type": "code",
"execution_count": 27,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"author_networks = {'facebo': '',\n",
" 'linked': '',\n",
" 'twitte': '',\n",
" 'google': ''}"
]
},
{
"cell_type": "code",
"execution_count": 28,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"response = urllib.request.urlopen(author_web)\n",
"html = response.read()\n",
"soup = BeautifulSoup(html, 'html.parser')"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Get all the networks that the author is in"
]
},
{
"cell_type": "code",
"execution_count": 29,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/plain": [
"[\n",
"
\n",
"
\n",
"
\n",
"
\n",
"
]"
]
},
"execution_count": 29,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"networks = soup.find_all(\"div\", { \"class\" : \"profile-networks\"})\n",
"networks"
]
},
{
"cell_type": "code",
"execution_count": 30,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/plain": [
"'[]'"
]
},
"execution_count": 30,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"networks = str(networks).replace('network-badge-round', '')\n",
"networks"
]
},
{
"cell_type": "code",
"execution_count": 31,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/plain": [
"['[]']"
]
},
"execution_count": 31,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"networks = networks.split('network-badge-')\n",
"networks # Note networks is now a list of strings"
]
},
{
"cell_type": "code",
"execution_count": 32,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"for network in networks:\n",
" if network[:6] in author_networks.keys():\n",
" author_networks[network[:6]] = network.split('href=\"')[1].split('\" target')[0]"
]
},
{
"cell_type": "code",
"execution_count": 33,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/plain": [
"{'facebo': 'https://www.facebook.com/brianries',\n",
" 'google': 'https://plus.google.com/+BrianRiesAtMashable?rel=author',\n",
" 'linked': 'http://www.linkedin.com/in/briankries',\n",
" 'twitte': 'https://twitter.com/moneyries'}"
]
},
"execution_count": 33,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"author_networks"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Get number of twitter followers"
]
},
{
"cell_type": "code",
"execution_count": 34,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/plain": [
"'https://twitter.com/moneyries'"
]
},
"execution_count": 34,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"author_networks['twitter_followers'] = 0\n",
"author_networks['twitte']"
]
},
{
"cell_type": "code",
"execution_count": 35,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"response = urllib.request.urlopen(author_networks['twitte'])\n",
"html = response.read()\n",
"soup = BeautifulSoup(html, 'html.parser')"
]
},
{
"cell_type": "code",
"execution_count": 36,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/plain": [
"'17,5\\xa0K'"
]
},
"execution_count": 36,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"followers = str(soup.find_all(\"span\", { \"class\" : \"ProfileNav-value\"})[2])\n",
"followers"
]
},
{
"cell_type": "code",
"execution_count": 37,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/plain": [
"'17,5\\xa0K'"
]
},
"execution_count": 37,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"followers = followers.split('\">')[1]\n",
"followers"
]
},
{
"cell_type": "code",
"execution_count": 38,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/plain": [
"17500"
]
},
"execution_count": 38,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"if ('K' in followers) or ('mil' in followers):\n",
" followers = followers.split('\\xa0')[0]\n",
" if ',' in followers:\n",
" followers = followers.replace(',', '') + '00'\n",
" else:\n",
" followers = followers + '000'\n",
"else:\n",
" followers = followers.split('')[1].split('By ')[1].split('<')[0]\n",
" \n",
" # Number of shares\n",
" shares = soup.find_all(\"div\", { \"class\" : \"total-shares\"})\n",
" shares = str(shares).split('')[1].split('')[0]\n",
" if 'k' in shares:\n",
" shares = shares[:-1]\n",
" shares = shares.replace('.', '') + '00'\n",
" \n",
" # Get text\n",
" try:\n",
" text = str(soup.get_text()).split(\"UTC\\n\\n\\n\")[1]\n",
" except IndexError:\n",
" text = str(soup.get_text()).split(\"Analysis\\n\\n\")[1]\n",
" \n",
" text = text.split('Have something to add to this story?')[0]\n",
" \n",
" author_web = soup.find_all(\"a\", { \"class\" : \"byline\"})\n",
" if author_web != []:\n",
" author_web = 'http://mashable.com' + str(author_web).split('href=\"')[1].split('\">')[0]\n",
" \n",
" # Author networks\n",
" author_networks = {'facebo': '',\n",
" 'linked': '',\n",
" 'twitte': '',\n",
" 'google': ''}\n",
"\n",
" response = urllib.request.urlopen(author_web)\n",
" html = response.read()\n",
" soup = BeautifulSoup(html, 'html.parser')\n",
"\n",
" networks = str(soup.find_all(\"div\", { \"class\" : \"profile-networks\"})).replace('network-badge-round', '').split('network-badge-')\n",
"\n",
" for network in networks:\n",
" if network[:6] in author_networks.keys():\n",
" author_networks[network[:6]] = network.split('href=\"')[1].split('\" target')[0]\n",
"\n",
" # Author twitter followers\n",
" author_networks['twitter_followers'] = 0\n",
" if author_networks['twitte'] != '':\n",
"\n",
" response = urllib.request.urlopen(author_networks['twitte'])\n",
" html = response.read()\n",
" soup = BeautifulSoup(html, 'html.parser')\n",
"\n",
" followers = str(soup.find_all(\"span\", { \"class\" : \"ProfileNav-value\"})[2]).split('\">')[1]\n",
" if ('K' in followers) or ('mil' in followers):\n",
" followers = followers.split('\\xa0')[0]\n",
" if ',' in followers:\n",
" followers = followers.replace(',', '') + '00'\n",
" else:\n",
" followers = followers + '000'\n",
" else:\n",
" followers = followers.split('