i want to get CNN news article all link
for example
in this link
https://edition.cnn.com/search/?q=%20news&size=10
i can show lastest 10 news
to get news link i tried two methods.
html_page = urlopen(url)
soup = BeautifulSoup(html_page, "lxml")
cnn_paper = newspaper.build(url, memoize_articles=False) # ~15 seconds
n_list = []
for article in cnn_paper.articles:
n_list.append(article.url)
and
req = Request(url)
html_page = urlopen(req)
soup = BeautifulSoup(html_page, "lxml")
links = []
for link in soup.findAll('a'):
links.append(link.get('href'))
but i can`t get news link
If you go to the next page, i can only get the same link