Posts

Showing posts from 2018

Developing a Twitter bot that lets me watch Youtube videos on random!

I have been getting back to building bots. I think bots are beautiful. Bots are the future. I just finished watching Altered Carbon first Season on Netflix and the Matrix-like world reminded me of how close we are to AI taking over. But I am getting ahead of myself. Check this out: Javi Reina - Alex Guerrero feat. Syntheticsax - Oig 2010 https://t.co/Jczom6C5L9 @sndpwrites #nWriter — nWriter (@nWriterdotcom) April 16, 2018 This post is going to be a part of a series of things I am working on with my bot. I'm having fun. My bot is listening to mentions at @nWriterdotcom. Currently I am filtering out any other tweets that do not have the hashtag ( #youtubeme ) so I can identify different sources of automated tweets(There's a lot).  Right now my bot does this : 1. Listen to mentions containing hashtag #youtubeme 2. Collect public username of source twitter account 3. Generate a random youtube video link with its full information. 4. Bundle it all together into on

Working with string manipulation and basic file io operations in Python

Image
Last night, this tweet appeared in my timeline and caught my attention. The word "friends" is said in every episode of Friends. — Fact (@Fact) March 9, 2018 This doesn't sound right. There was no possible way to verify this and I expressed my concern over the same. A friend suggested counting the word in subtitle file for all episodes. I liked the idea, and a small weekend project was born. Before I give the spoilers away on whether or not it is true, I want to first clarify a few different things on how I got it done. I didn't have the subtitles file so I had to download them all before parsing the word "friends". I began by looking at websites that would let me download the english subtitle files the easiest way possible. Originally I had planned to use urllib   with BeautifulSoup to download the files but TV Subtitles made it really easy for me(kudos to the site developers btw). They let you download seasonwise bulk zip files of all episodes