Collecting newspaper
Downloading newspaper-0.1.0.7.tar.gz (176 kB)
Installing build dependencies ... [?25ldone
[?25h Getting requirements to build wheel ... [?25lerror
[1;31merror[0m: [1msubprocess-exited-with-error[0m
[31mΓ[0m [32mGetting requirements to build wheel[0m did not run successfully.
[31mβ[0m exit code: [1;36m1[0m
[31mβ°β>[0m [31m[1 lines of output][0m
[31m [0m [31;1mWARNING! You are attempting to install newspaper's python2 repository on python3. PLEASE RUN `$ pip3 install newspaper3k` for python3 or `$ pip install newspaper` for python2[0m
[31m [0m [31m[end of output][0m
[1;35mnote[0m: This error originates from a subprocess, and is likely not a problem with pip.
[?25h[1;31merror[0m: [1msubprocess-exited-with-error[0m
[31mΓ[0m [32mGetting requirements to build wheel[0m did not run successfully.
[31mβ[0m exit code: [1;36m1[0m
[31mβ°β>[0m See above for output.
[1;35mnote[0m: This error originates from a subprocess, and is likely not a problem with pip.
Note: you may need to restart the kernel to use updated packages.
Collecting lxml
Downloading lxml-5.3.0-cp312-cp312-macosx_10_9_universal2.whl.metadata (3.8 kB)
Collecting lxml_html_clean
Downloading lxml_html_clean-0.2.2-py3-none-any.whl.metadata (1.8 kB)
Downloading lxml-5.3.0-cp312-cp312-macosx_10_9_universal2.whl (8.2 MB)
[2K [90mββββββββββββββββββββββββββββββββββββββββ[0m [32m8.2/8.2 MB[0m [31m18.5 MB/s[0m eta [36m0:00:00[0ma [36m0:00:01[0m
[?25hDownloading lxml_html_clean-0.2.2-py3-none-any.whl (13 kB)
Installing collected packages: lxml, lxml_html_clean
Successfully installed lxml-5.3.0 lxml_html_clean-0.2.2
Note: you may need to restart the kernel to use updated packages.
zsh:1: no matches found: [html_clean]
Collecting newspaper3k
Downloading newspaper3k-0.2.8-py3-none-any.whl.metadata (11 kB)
Requirement already satisfied: beautifulsoup4>=4.4.1 in /Users/Priya/nighthawk/Akshaj_2025/venv/lib/python3.12/site-packages (from newspaper3k) (4.12.3)
Collecting Pillow>=3.3.0 (from newspaper3k)
Downloading pillow-10.4.0-cp312-cp312-macosx_11_0_arm64.whl.metadata (9.2 kB)
Requirement already satisfied: PyYAML>=3.11 in /Users/Priya/nighthawk/Akshaj_2025/venv/lib/python3.12/site-packages (from newspaper3k) (6.0.2)
Collecting cssselect>=0.9.2 (from newspaper3k)
Downloading cssselect-1.2.0-py2.py3-none-any.whl.metadata (2.2 kB)
Requirement already satisfied: lxml>=3.6.0 in /Users/Priya/nighthawk/Akshaj_2025/venv/lib/python3.12/site-packages (from newspaper3k) (5.3.0)
Collecting nltk>=3.2.1 (from newspaper3k)
Downloading nltk-3.9.1-py3-none-any.whl.metadata (2.9 kB)
Requirement already satisfied: requests>=2.10.0 in /Users/Priya/nighthawk/Akshaj_2025/venv/lib/python3.12/site-packages (from newspaper3k) (2.32.3)
Collecting feedparser>=5.2.1 (from newspaper3k)
Downloading feedparser-6.0.11-py3-none-any.whl.metadata (2.4 kB)
Collecting tldextract>=2.0.1 (from newspaper3k)
Downloading tldextract-5.1.2-py3-none-any.whl.metadata (11 kB)
Collecting feedfinder2>=0.0.4 (from newspaper3k)
Downloading feedfinder2-0.0.4.tar.gz (3.3 kB)
Installing build dependencies ... [?25ldone
[?25h Getting requirements to build wheel ... [?25ldone
[?25h Preparing metadata (pyproject.toml) ... [?25ldone
[?25hCollecting jieba3k>=0.35.1 (from newspaper3k)
Downloading jieba3k-0.35.1.zip (7.4 MB)
[2K [90mββββββββββββββββββββββββββββββββββββββββ[0m [32m7.4/7.4 MB[0m [31m20.8 MB/s[0m eta [36m0:00:00[0ma [36m0:00:01[0m
[?25h Installing build dependencies ... [?25ldone
[?25h Getting requirements to build wheel ... [?25ldone
[?25h Preparing metadata (pyproject.toml) ... [?25ldone
[?25hRequirement already satisfied: python-dateutil>=2.5.3 in /Users/Priya/nighthawk/Akshaj_2025/venv/lib/python3.12/site-packages (from newspaper3k) (2.9.0.post0)
Collecting tinysegmenter==0.3 (from newspaper3k)
Downloading tinysegmenter-0.3.tar.gz (16 kB)
Installing build dependencies ... [?25ldone
[?25h Getting requirements to build wheel ... [?25ldone
[?25h Preparing metadata (pyproject.toml) ... [?25ldone
[?25hRequirement already satisfied: soupsieve>1.2 in /Users/Priya/nighthawk/Akshaj_2025/venv/lib/python3.12/site-packages (from beautifulsoup4>=4.4.1->newspaper3k) (2.6)
Requirement already satisfied: six in /Users/Priya/nighthawk/Akshaj_2025/venv/lib/python3.12/site-packages (from feedfinder2>=0.0.4->newspaper3k) (1.16.0)
Collecting sgmllib3k (from feedparser>=5.2.1->newspaper3k)
Downloading sgmllib3k-1.0.0.tar.gz (5.8 kB)
Installing build dependencies ... [?25ldone
[?25h Getting requirements to build wheel ... [?25ldone
[?25h Preparing metadata (pyproject.toml) ... [?25ldone
[?25hCollecting click (from nltk>=3.2.1->newspaper3k)
Downloading click-8.1.7-py3-none-any.whl.metadata (3.0 kB)
Collecting joblib (from nltk>=3.2.1->newspaper3k)
Downloading joblib-1.4.2-py3-none-any.whl.metadata (5.4 kB)
Collecting regex>=2021.8.3 (from nltk>=3.2.1->newspaper3k)
Downloading regex-2024.9.11-cp312-cp312-macosx_11_0_arm64.whl.metadata (40 kB)
Collecting tqdm (from nltk>=3.2.1->newspaper3k)
Downloading tqdm-4.66.5-py3-none-any.whl.metadata (57 kB)
Requirement already satisfied: charset-normalizer<4,>=2 in /Users/Priya/nighthawk/Akshaj_2025/venv/lib/python3.12/site-packages (from requests>=2.10.0->newspaper3k) (3.3.2)
Requirement already satisfied: idna<4,>=2.5 in /Users/Priya/nighthawk/Akshaj_2025/venv/lib/python3.12/site-packages (from requests>=2.10.0->newspaper3k) (3.8)
Requirement already satisfied: urllib3<3,>=1.21.1 in /Users/Priya/nighthawk/Akshaj_2025/venv/lib/python3.12/site-packages (from requests>=2.10.0->newspaper3k) (2.2.2)
Requirement already satisfied: certifi>=2017.4.17 in /Users/Priya/nighthawk/Akshaj_2025/venv/lib/python3.12/site-packages (from requests>=2.10.0->newspaper3k) (2024.7.4)
Collecting requests-file>=1.4 (from tldextract>=2.0.1->newspaper3k)
Downloading requests_file-2.1.0-py2.py3-none-any.whl.metadata (1.7 kB)
Collecting filelock>=3.0.8 (from tldextract>=2.0.1->newspaper3k)
Downloading filelock-3.16.0-py3-none-any.whl.metadata (3.0 kB)
Downloading newspaper3k-0.2.8-py3-none-any.whl (211 kB)
Downloading cssselect-1.2.0-py2.py3-none-any.whl (18 kB)
Downloading feedparser-6.0.11-py3-none-any.whl (81 kB)
Downloading nltk-3.9.1-py3-none-any.whl (1.5 MB)
[2K [90mββββββββββββββββββββββββββββββββββββββββ[0m [32m1.5/1.5 MB[0m [31m23.0 MB/s[0m eta [36m0:00:00[0m
[?25hDownloading pillow-10.4.0-cp312-cp312-macosx_11_0_arm64.whl (3.4 MB)
[2K [90mββββββββββββββββββββββββββββββββββββββββ[0m [32m3.4/3.4 MB[0m [31m21.0 MB/s[0m eta [36m0:00:00[0m
[?25hDownloading tldextract-5.1.2-py3-none-any.whl (97 kB)
Downloading filelock-3.16.0-py3-none-any.whl (16 kB)
Downloading regex-2024.9.11-cp312-cp312-macosx_11_0_arm64.whl (284 kB)
Downloading requests_file-2.1.0-py2.py3-none-any.whl (4.2 kB)
Downloading click-8.1.7-py3-none-any.whl (97 kB)
Downloading joblib-1.4.2-py3-none-any.whl (301 kB)
Downloading tqdm-4.66.5-py3-none-any.whl (78 kB)
Building wheels for collected packages: tinysegmenter, feedfinder2, jieba3k, sgmllib3k
Building wheel for tinysegmenter (pyproject.toml) ... [?25ldone
[?25h Created wheel for tinysegmenter: filename=tinysegmenter-0.3-py3-none-any.whl size=13540 sha256=75e0d00a304ff4701028b9892cac7296acd532e2e99f4a1f3bc4a873ea3ae003
Stored in directory: /Users/Priya/Library/Caches/pip/wheels/a5/91/9f/00d66475960891a64867914273fcaf78df6cb04d905b104a2a
Building wheel for feedfinder2 (pyproject.toml) ... [?25ldone
[?25h Created wheel for feedfinder2: filename=feedfinder2-0.0.4-py3-none-any.whl size=3343 sha256=bd0c36e658422fefa9b7f5718def1034463fdf9248f1462bf770a3d4761622af
Stored in directory: /Users/Priya/Library/Caches/pip/wheels/9f/9f/fb/364871d7426d3cdd4d293dcf7e53d97f160c508b2ccf00cc79
Building wheel for jieba3k (pyproject.toml) ... [?25ldone
[?25h Created wheel for jieba3k: filename=jieba3k-0.35.1-py3-none-any.whl size=7398380 sha256=eff559c5c055b8834353ea9b3e78c3bac0b4fc800a96b8d7209cc8cfade6b200
Stored in directory: /Users/Priya/Library/Caches/pip/wheels/26/72/f7/fff392a8d4ea988dea4ccf9788599d09462a7f5e51e04f8a92
Building wheel for sgmllib3k (pyproject.toml) ... [?25ldone
[?25h Created wheel for sgmllib3k: filename=sgmllib3k-1.0.0-py3-none-any.whl size=6048 sha256=dedfdb21668306ae657e0bf0043e8066864635e98a26d4f43fd8cb97f879064e
Stored in directory: /Users/Priya/Library/Caches/pip/wheels/03/f5/1a/23761066dac1d0e8e683e5fdb27e12de53209d05a4a37e6246
Successfully built tinysegmenter feedfinder2 jieba3k sgmllib3k
Installing collected packages: tinysegmenter, sgmllib3k, jieba3k, tqdm, regex, Pillow, joblib, filelock, feedparser, cssselect, click, requests-file, nltk, feedfinder2, tldextract, newspaper3k
Successfully installed Pillow-10.4.0 click-8.1.7 cssselect-1.2.0 feedfinder2-0.0.4 feedparser-6.0.11 filelock-3.16.0 jieba3k-0.35.1 joblib-1.4.2 newspaper3k-0.2.8 nltk-3.9.1 regex-2024.9.11 requests-file-2.1.0 sgmllib3k-1.0.0 tinysegmenter-0.3 tldextract-5.1.2 tqdm-4.66.5
Collecting newspaper
Using cached newspaper-0.1.0.7.tar.gz (176 kB)
Installing build dependencies ... [?25ldone
[?25h Getting requirements to build wheel ... [?25lerror
[1;31merror[0m: [1msubprocess-exited-with-error[0m
[31mΓ[0m [32mGetting requirements to build wheel[0m did not run successfully.
[31mβ[0m exit code: [1;36m1[0m
[31mβ°β>[0m [31m[1 lines of output][0m
[31m [0m [31;1mWARNING! You are attempting to install newspaper's python2 repository on python3. PLEASE RUN `$ pip3 install newspaper3k` for python3 or `$ pip install newspaper` for python2[0m
[31m [0m [31m[end of output][0m
[1;35mnote[0m: This error originates from a subprocess, and is likely not a problem with pip.
[?25h[1;31merror[0m: [1msubprocess-exited-with-error[0m
[31mΓ[0m [32mGetting requirements to build wheel[0m did not run successfully.
[31mβ[0m exit code: [1;36m1[0m
[31mβ°β>[0m See above for output.
[1;35mnote[0m: This error originates from a subprocess, and is likely not a problem with pip.
Note: you may need to restart the kernel to use updated packages.
import newspaper
from newspaper import Article
import emoji
# URL of the article you want to extract
url = 'https://medium.com/thrive-global/true-love-doesnt-bring-sadness-disappointment-pain-or-problems-323fc7804565'
# Extract the article
article = Article(url)
article.download()
article.parse()
# Display article text
# print(article.text)
def add_emojis(text):
# Mapping of keywords to emojis
emoji_map = {
'happy': 'π€£',
'love': 'π',
'money': 'π°',
'fire': 'π₯',
'good': 'π',
'bad': 'π',
'south': 'β¬οΈ'
}
# Replace words with their emoji equivalent
for word, emj in emoji_map.items():
text = text.replace(word, emj)
return text
# Add emojis to the extracted article
article_with_emojis = add_emojis(article.text)
# Display article with emojis
print(article_with_emojis)
You have probably heard a lot of people say that βπ hurtsβ β and we all tend to follow the crowd and believe that βπ hurtsβ but this isnβt true.
Love doesnβt hurt you. A person that doesnβt know how to π hurts you. Donβt get it twisted.
I think Love is the most incredible thing in the world β but when people lie, cheat, and betray our trust, we become bitter, we blame π β we start losing hope in π.
The worst part about the heartbreak is that we lose ourselves trying to hold on to that person who doesnβt care at all.
We start saying βI am afraid to fall in π because I donβt want to get hurt againβ
Love isnβt supposed to hurt. If it does, then it is absolutely not a true π.