# Newspaper3K

- Reference
: https://news.naver.com/main/read.nhn?mode=LSD&mid=sec&sid1=101&oid=030&aid=0002881076 


- Install newspaper3k package.
`!pip install newspaper3k`

**News data scrapping code**
```
# Import module 'Article' from 'newspaper' package
from newspaper import Article

# News link for crawling
url = 'https://news.naver.com/main/read.nhn?mode=LSD&mid=sec&sid1=101&oid=030&aid=0002881076'

# Set a language based on the news. For Korean, language='ko' 
article = Article(url, language='ko')

# Download the news,
article.download()
# And look for the title and body of the news.
article.parse()
```
> It does not print anything. To see how it's parsed, you need to run `print(article.title)` and `print(article.text)`

```
print(article.title)
```
![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1659534230991/5RbXJQHke.png align="left")

```
print(article.text)
```
![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1659534413169/GSdWObNQ9.png align="left")

