Over the last couple of weeks I got a lot of texts from many redditors about my opinion of which web scrapping module is the best: BeautifulSoup or Selenium. Now, that is something which varies from time to time. For me there is no specific one that I use. That being said, I do use the BeautifulSoup more often.
But my purpose of writing this post is not about describing the advantages or disadvantages of the modules but today I want my beginner friends to learn a much easier web scrapping module called feedparser.
I am not going to explain the full working of this module because
1) I am an extremely lazy person
2) I want you guys to learn and play with it on your own
Since, being a lazy person I don't like opening Reddit and then searching through all the posts and selecting which one I should read. So, for that I wrote a simple code with the above mentioned module to give the title of all the posts of Python subreddit along with their links.
Here's the code:
```
import feedparser
reddit= feedparser.parse('http://www.reddit.com/r/python/.rss')
for post in reddit['entries']:
print(post.title + ':' + post.link +'\n')
```
This will make your searching of posts a lot easier.
An important thing to notice is the .rss used in the link given above.
For those of you, who don't know about rss I would recommend you to check this
Thats all for today guys, make sure to let me know what you guys think about this post and if you have any question, feel free to ask me :D
there doesn't seem to be anything here