diff options
| author | Mitja Felicijan <mitja.felicijan@gmail.com> | 2019-10-22 20:11:24 +0200 |
|---|---|---|
| committer | Mitja Felicijan <mitja.felicijan@gmail.com> | 2019-10-22 20:11:24 +0200 |
| commit | 64465a1f265d265d3445db646682d6e8208c54a5 (patch) | |
| tree | d66a14e91982f48bbb009b5ee151273525305f29 /src | |
| parent | f80585cc72088839f982b490602eb3e468869ca7 (diff) | |
| download | mitjafelicijan.com-64465a1f265d265d3445db646682d6e8208c54a5.tar.gz | |
Fix code in sentiment analysys
Diffstat (limited to 'src')
| -rw-r--r-- | src/experiments/using-sentiment-analysis-for-click-bait-detection-in-rss-feeds.md | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/experiments/using-sentiment-analysis-for-click-bait-detection-in-rss-feeds.md b/src/experiments/using-sentiment-analysis-for-click-bait-detection-in-rss-feeds.md index c27c6d0..1f9d400 100644 --- a/src/experiments/using-sentiment-analysis-for-click-bait-detection-in-rss-feeds.md +++ b/src/experiments/using-sentiment-analysis-for-click-bait-detection-in-rss-feeds.md | |||
| @@ -32,8 +32,8 @@ import feedparser | |||
| 32 | feed_url = "https://www.theguardian.com/world/rss" | 32 | feed_url = "https://www.theguardian.com/world/rss" |
| 33 | feed = feedparser.parse(feed_url) | 33 | feed = feedparser.parse(feed_url) |
| 34 | 34 | ||
| 35 | for item in feed.import re: | 35 | # sanitize html |
| 36 | # sanitize html | 36 | for item in feed.entries: |
| 37 | item.description = re.sub('<[^<]+?>', '', item.description) | 37 | item.description = re.sub('<[^<]+?>', '', item.description) |
| 38 | ``` | 38 | ``` |
| 39 | 39 | ||
