Web Scraper | Python

For the Golang version please check here. And here is a python version: """create a rss class to parse the rss feed url anf get the title and link """ import feedparser import os class rss: def init(req, url): req.url = url def fetchDetails(req): try: url = req.url last_etag = '' last_modified = '' title = '' link = '' row = '' result = [] feed = feedparser.parse(url) last_etag = feed.
Read more →

Web Scraper | Golang

So you are interested in news and events and you want to track the latest news and headlines. And I guess you are familiar with the concept of RSS Rich Site Summary. Okay,😃Let’s start to build a simple Golang application to fetch the latest news and headlines with in a second. package main import ( "fmt" "github.com/mmcdole/gofeed" ) func feed(){ fp := gofeed.NewParser() feed, err := fp.ParseURL("http://feeds.reuters.com/reuters/UKTopNews") if err != nil { panic(err) } for _, item := range feed.
Read more →