GRL

Global Research Letters

Scrape And Summarize News Articles

Hello everyone and welcome to this video on the Python programming language and machine learning so in this video I want to write a program that scrapes and summarizes news articles newspaper agencies, navjeevan newspaper using a machine learning process called natural language processing or NLP for short and. I’m a big advocate on reusing code and libraries to make it easy to to write your program and that’s exactly what we’re going to do here in just a few lines of code. We’ll be able to scrape the article. Get the articles newspaper agencies, navjeevan newspaper author get its published date. Get the top image. We’re going to get the text of the article newspaper agencies, navjeevan newspaper and summarize the article newspaper agencies, navjeevan newspaper so we’re gonna do all that in just a few lines of code now currently. I’m on Google’s website called collab research newspaper agencies, navjeevan newspaper Google comm because it makes it easy to get started programming in Python so that means that you don’t have to install Python up to your computer you can just go to this website and log in using your Google account and get started writing your Python code alright so let’s go ahead and get started writing our program to scrape and summarize news articles newspaper agencies, navjeevan newspaper so the first thing that we need to do is go to file and then go down to new. Python 3 notebook and then a new tab will open up for us and a new cell where we can immediately start writing our Python program now in comments. I like to put a description of what the program does or it’s supposed to do that way when I look back at it. I can just read the read that comment and know exactly what’s supposed to do and other people can do the same as well so this program scrapes and summarizes news articles newspaper agencies, navjeevan newspaper. Ok alright so. I’m gonna head creat I’m gonna go ahead and create a new cell and here. We’re going to import the libraries. But before that you’re going to need to make sure that you have. Those libraries installed those libraries or packages. If you is what they call them as well so you need to make sure you install the packages first and the packages that you need to install is called in l. TK and newspaper 3k so in order to install them just type pip install NL TK and the other one is pip.

Install newspaper 3k. Okay and then just run that um and you will be able to install these packages alright so. I’m just gonna leave them in comments here so I’m gonna go ahead and create a new sale because I already have them installed and I’m just going to import the libraries so here in comments. Let’s type import these libraries. So we’re gonna import NL DK and we’re going to run an import article newspaper agencies, navjeevan newspaper from newspaper so from newspaper import article. Alright and let me go ahead and run this cell by clicking this button to the left to make sure there’s no issues and it looks like there aren’t the great so I’m going to create a new cell here and we are going to get the article newspaper agencies, navjeevan newspaper so I’m gonna create a variable called URL instead it equal to the URL of the article newspaper agencies, navjeevan newspaper so I have another tab here where we have this article newspaper agencies, navjeevan newspaper from the Washington Post title. You download it face out. Here’s what you’ve just done to your privacy so this article newspaper agencies, navjeevan newspaper is basically about the new face app. That was used to age people’s photo or age people in photos recently that went viral. And so you may or may not have seen it on social media everywhere. But that’s what this article newspaper agencies, navjeevan newspaper is about and about some privacy issues with that app so I’m just going to take this article newspaper agencies, navjeevan newspaper take the URL. I’m gonna copy it come back over here and I’m gonna paste it in between these quotes and then we’re just gonna go down here and I’m gonna create a nother variable called article newspaper agencies, navjeevan newspaper instead equal to article newspaper agencies, navjeevan newspaper and then I’m going to put in the URL here and let’s run this okay so looks like everything’s good. We’re going to create a new cell here and in this cell we’re going to do some. NLP so first I’m gonna do is download the article newspaper agencies, navjeevan newspaper so article newspaper agencies, navjeevan newspaper dot download okay. And then we want to parse the articles newspaper agencies, navjeevan newspaper so we just type article newspaper agencies, navjeevan newspaper dot parse and then we need to download. Punk so NLT KDOT download Punk and then we need to do some natural language processing so I just type article newspaper agencies, navjeevan newspaper dot NLP okay and I’ll run this here and hopefully there’s no issues and it looks good so we create a new cell here and now we can start.

I’m getting all that stuff that we want. And just you know a few lines of code so let’s get the author are the authors of the article newspaper agencies, navjeevan newspaper and to do that we just type article newspaper agencies, navjeevan newspaper dot authors so if I run this by clicking that button on the Left I get back this list of authors so let’s see if we can see um Jeffrey a Fowler. So that’s the first one here. I’m trying to get off of that there we go so Jeffrey a Fowler here so let’s go to the article newspaper agencies, navjeevan newspaper and scroll down and we see that indeed the author is Jeffrey a Fowler. Alright so let’s go back to our program here and create a new cell and in this cell we will get the published date this often. I hear get the publish date and to do that. We just typed article newspaper agencies, navjeevan newspaper died publish underscore a date and then just run this cell and now this tells us that this article newspaper agencies, navjeevan newspaper was published on July 17 2019. So that’s pretty cool and now that’s going to create a new sales. We’ll go ahead and click code here and create our new cell and I want to get the top image of the article newspaper agencies, navjeevan newspaper so to do that. I just type article newspaper agencies, navjeevan newspaper dot top underscore image and then run this here and so it gives us a link if I click on that link we can see the image and if I go to the article newspaper agencies, navjeevan newspaper and scroll down here we can see that the image is indeed in the article. So that’s pretty cool. I’m gonna go ahead and create a new cell here where I want to get the articles newspaper agencies, navjeevan newspaper text so it’s gonna type print and then article newspaper agencies, navjeevan newspaper dot text and so if I run this here. This gives us back the text of the article newspaper agencies, navjeevan newspaper so if I read is off. It looks like it has technology columnist and then it says when an app goes viral. How can you know whether it’s all good fun or covertly violating your privacy by say sending your face to the Russian government and so if we go back to the article newspaper agencies, navjeevan newspaper and I scroll up it looks like here. It says when an app goes viral.

How can you know whether it’s all good fun or covertly violating your privacy by say sending your face to the Russian government okay and yes. This app is or was developed by Russians. Okay so let’s go ahead and go back to our code something that’s really neat and just a few lines of code would be. We were able to do so much so far. I’m gonna go ahead and create a new cell and here. We’re going to get a summary summary of the article newspaper agencies, navjeevan newspaper and to do that. Just print article newspaper agencies, navjeevan newspaper dot summary and then run this and now we get a summary of the articles newspaper agencies, navjeevan newspaper so it says the most unsettling part was how much data face that was sending to his own own servers. After which who knows what happens so pretty interesting summer here they say just the leading. The app won’t get rid of the photos face that may have in the cloud so anyways um I thought this was one. I thought the interesting articles newspaper agencies, navjeevan newspaper so I chose it for this example – this this newspaper package or a library. I think is amazing to scrape news articles newspaper agencies, navjeevan newspaper and you guys should give it a try as well so the guy who developed it. I actually forgot his name. I apologize for that but he did a great job on this package and I really liked it. Think it’s amazing so anyways I’ll be sure to put the code on my github and then put a link to that in the description below. Please leave any questions you have about this video or about the code in the comment section. Please become a subscriber to my channel for more videos like this on. Python and other programming languages and hit that like button it really helps out and if you found this video helpful please share it. Maybe other people will find it helpful as well and as always thank you for watching and I will see you all in the next video.

Where to find great research papers?

Various great research journals such as Global Research Letters are a great option and way to help you look up impactful research papers with a great format. Here, you will find a number of various research papers that are provided and made available to you in the journal, which will help you write your own paper.

You can very easily find papers on a variety of topics at Global Research Letters, which will help you with your own research work and understanding of writing and publishing research papers properly. With access to so many amazing research papers, you can practice and learn the process of writing research papers and their importance.

Leave a Comment

Your email address will not be published. Required fields are marked *