Questions tagged [newspaper3k]
49 questions
0
votes
2 answers
Can't seem to access Metatags
I need to scrape the author and date from a news article, but I'm having trouble accessing some information in the meta tags.
import requests, random, re, os
from bs4 import BeautifulSoup as bs
import urllib.parse
import time
from newspaper import…

Seth McCombie
- 1
- 3
0
votes
1 answer
exception in newsplease commoncrawl.py file
i am using newsplease library that i have cloned from https://github.com/fhamborg/news-please.
i want to use newsplease to get news artices from commoncrawl news datasets.
i am running commoncrawl.py file as instruct here.
i have used the command…

Prateek Tyagi
- 51
- 1
- 8
0
votes
1 answer
How to use txt file instead of Article ? (Python)
I wrote a code for reading article and self-learning AI. First, I read the article with URL and download it.Then I parse the article and use it for my AI's learning text.But now I want to read text from txt file.How can I assign txt file's text to…
user12689308
0
votes
0 answers
NLTK: TypeError: must be str, not list
I'm using newspaper3k in a docker container. I downloaded all the needed nltk data, however I'm having this problem when I run article.nlp() then article.nlp() and article.summary.
When I used the same code in a Flask app it worked, now I'm testing…

4m1nh4j1
- 4,289
- 16
- 62
- 104