<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Shijith Kunhitty</title>
    <description>The latest articles on Forem by Shijith Kunhitty (@shijith).</description>
    <link>https://forem.com/shijith</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F205928%2F77c92cbe-80b9-40fa-bc83-5cd6866abc46.jpeg</url>
      <title>Forem: Shijith Kunhitty</title>
      <link>https://forem.com/shijith</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/shijith"/>
    <language>en</language>
    <item>
      <title>Hide like counts on Twitter and karma points on Reddit with uBlock Origin</title>
      <dc:creator>Shijith Kunhitty</dc:creator>
      <pubDate>Thu, 29 Jul 2021 14:21:46 +0000</pubDate>
      <link>https://forem.com/shijith/hide-like-counts-on-twitter-and-karma-points-on-reddit-with-ublock-origin-4789</link>
      <guid>https://forem.com/shijith/hide-like-counts-on-twitter-and-karma-points-on-reddit-with-ublock-origin-4789</guid>
      <description>&lt;h3&gt;
  
  
  Summary
&lt;/h3&gt;

&lt;p&gt;The post is about how I use the adblocker &lt;a href="https://github.com/gorhill/uBlock"&gt;uBlock Origin&lt;/a&gt; to hide like/retweet counts on Twitter, and karma points on Reddit.&lt;/p&gt;

&lt;p&gt;The motivation being that by removing all these stats social media pushes on you, you can have a better experience on these platforms and improve your digital wellbeing.&lt;/p&gt;

&lt;p&gt;To remove all the tweet/post/user stats, install uBlock Origin for your browser, copy the filters from this &lt;a href="https://github.com/shijithpk/hide_like_counts_with_ublock"&gt;Github repo&lt;/a&gt; and paste it into the 'My filters' section. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--czSCvLNx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/o4wkONX.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--czSCvLNx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/o4wkONX.jpg" alt="Pic of uBlock my filters section"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;These filters are mainly for people who use Reddit and Twitter on their desktops, sorry mobile app users. It could be used on mobile with a Firefox-uBlock combo (Android) or Safari-AdGuard (iOS), but I haven't tested them. The filters could be used in adblockers other than uBlock Origin, but you'll have to check first.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why I created these filters
&lt;/h3&gt;

&lt;p&gt;The initial reason was to stop myself from getting upset over downvotes on Reddit. I'm particularly active on the subreddit for my home state, but saying anything unpopular has consequences with trolls downvoting your comment and bringing down your overall user &lt;a href="https://www.reddit.com/r/karma/wiki/index/faq/"&gt;karma&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I was angry about this in the beginning, but realised that I could either stop expressing my opinions to keep my karma from going down, or I could continue saying what I have to say. I decided to not censor myself, and do something so that others' downvotes don't affect me.&lt;/p&gt;

&lt;p&gt;The solution I came up with was to use my adblocker to hide my user karma from my screen, and also hide how many downvotes my comments are getting. So the points become out of sight, out of mind and I don't stress over them anymore.&lt;/p&gt;

&lt;p&gt;This is a screenshot of a subreddit homepage where the vote count gets hidden after applying my filters.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--BNW5nAEx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/Mh9XOi2.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--BNW5nAEx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/Mh9XOi2.jpg" alt="Pic of a subreddit homepage before applying filters and after"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In this before and after screenshot, the vote count for comments under a post are hidden.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--6Q-1huDA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/QatWQ4t.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--6Q-1huDA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/QatWQ4t.jpg" alt="Pic of how filters hide negative votes for a post"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Note that these filters still allow you to upvote or downvote posts or comments, so you can still engage with Reddit. Everything still works the same, just that the stats get hidden now.&lt;/p&gt;

&lt;p&gt;It's not just the vote counts for your own posts/comments that get hidden, but those of everyone else too. And I think this might be a better way of doing things. Your judgement of a post's or comment's worth will now not be dependent on how many votes it's gotten, but only on whether you think it's good or not.&lt;/p&gt;

&lt;h3&gt;
  
  
  Creating filters for Twitter
&lt;/h3&gt;

&lt;p&gt;Doing something similar for Twitter was kind of an afterthought. I didn't really feel the need to do something for it like I did for Reddit. &lt;/p&gt;

&lt;p&gt;But I know that Instagram is &lt;a href="https://about.instagram.com/blog/announcements/giving-people-more-control"&gt;introducing&lt;/a&gt; the option to hide like counts for their posts. So, as an experiment, I wanted to experience what Twitter would be like without like and retweet counts, follower counts etc.&lt;/p&gt;

&lt;p&gt;Below is a before and after screenshot of NYT's Twitter profile where the follower count gets hidden, as well as the blue tick.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--b7xKT26v--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/Mhmev43.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--b7xKT26v--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/Mhmev43.jpg" alt="Pic of follower account and blue ticks hidden by filters for NYT's Twitter profile"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is a before and after screenshot for a tweet where the reply, retweet and like counts get hidden.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Dm19MirF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/JXSqlsk.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Dm19MirF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/JXSqlsk.jpg" alt="Pic of how filters hide reply, retweet and like counts for a tweet, before and after"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And in the spirit of evaluating people's tweets based purely on the content, I decided to remove blue ticks from the Twitter interface too, so that I didn't look at tweets coming from verified handles more favourably. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--n7WKQf4C--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/3prMTVe.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--n7WKQf4C--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/3prMTVe.jpg" alt="Pic of how filters hide blue ticks for verified accounts, before and after for an NYT tweet"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I've browsed Twitter this way for a few weeks now, and while I don't really miss the retweet/like counts or the blue ticks, I do miss the reply count.&lt;/p&gt;

&lt;p&gt;The quality of replies to tweets can be pretty poor sometimes, but there's always a few people in there with good insights. No reply counts means I don't see which tweets are getting responses, so I don't know which tweets I need to click on to get to those insights. The reply count is important for the way I use Twitter, so that's something I'm considering keeping and not hiding.&lt;/p&gt;

&lt;p&gt;I also use Tweetdeck heavily, so there are filters in my list for Tweetdeck too. As with the main website Twitter.com, I'm considering unhiding the reply counts.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Eo9ZVF1U--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/Be28RKa.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Eo9ZVF1U--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/Be28RKa.jpg" alt="Pic of reply, retweet and like stats being hidden for a tweet in Tweetdeck, before and after filters are applied"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Wrapping up
&lt;/h3&gt;

&lt;p&gt;The first time you use these filters, the interfaces of these websites will look dramatically different. If there are any particular changes you want to undo, comment out the individual filter responsible in uBlock Origin. There's a line above each filter explaining what it does.&lt;/p&gt;

&lt;p&gt;And if the layout of these websites change in a way that make these filters ineffective, I'll keep the &lt;a href="https://github.com/shijithpk/hide_like_counts_with_ublock"&gt;Github repo&lt;/a&gt; updated with working versions of these filters.&lt;/p&gt;

&lt;p&gt;You can even set up your own filters to deal with annoyances on other websites. This &lt;a href="https://www.youtube.com/watch?v=2lisQQmWQkY"&gt;YouTube video&lt;/a&gt; is a good intro to uBlock Origin and this &lt;a href="https://github.com/gorhill/uBlock/wiki"&gt;wiki&lt;/a&gt; goes into all the details.&lt;/p&gt;

&lt;p&gt;Twitter and Reddit may eventually introduce settings like Facebook and Instagram have to hide like/vote counts, but till that happens, this &lt;a href="https://github.com/shijithpk/hide_like_counts_with_ublock"&gt;filter list&lt;/a&gt; is a handy option.&lt;/p&gt;

&lt;h3&gt;
  
  
  Suggestions, feedback
&lt;/h3&gt;

&lt;p&gt;I'm not a professional developer/programmer/coder, so am sure there are things here I should be doing differently. If you have any suggestions, please let me know at &lt;a href="mailto:mail@shijith.com"&gt;mail@shijith.com&lt;/a&gt; or at my Twitter handle &lt;a href="https://twitter.com/shijith"&gt;@shijith&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;For example, I understand a filter will be more efficient, the smaller the initial set of nodes it goes through on a webpage. So if you have advice on optimising these filters even further, do let me know!&lt;/p&gt;

</description>
      <category>twitter</category>
      <category>reddit</category>
      <category>ublockorigin</category>
      <category>socialmedia</category>
    </item>
    <item>
      <title>A Python package that makes it easier to work with lists on Twitter</title>
      <dc:creator>Shijith Kunhitty</dc:creator>
      <pubDate>Mon, 12 Jul 2021 07:50:32 +0000</pubDate>
      <link>https://forem.com/shijith/a-python-package-that-makes-it-easier-to-work-with-lists-on-twitter-p14</link>
      <guid>https://forem.com/shijith/a-python-package-that-makes-it-easier-to-work-with-lists-on-twitter-p14</guid>
      <description>&lt;h3&gt;
  
  
  TLDR
&lt;/h3&gt;

&lt;p&gt;The post is about &lt;a href="https://github.com/shijithpk/twitter_list_mgmt"&gt;&lt;code&gt;twitter_list_mgmt&lt;/code&gt;&lt;/a&gt;, a python package I created to make it easier to add users to your Twitter list from other lists, among other things.&lt;/p&gt;

&lt;p&gt;Say you've created a covid twitter list to keep track of news around the pandemic. You've just found another list on covid curated by an epidemiologist in London, and you want to add members from that to your own Covid list. This is the package you use for it.&lt;/p&gt;

&lt;p&gt;Now for most basic operations like retrieving the current membership of a Twitter list, adding users to it, removing them etc. the &lt;a href="https://github.com/tweepy/tweepy"&gt;Tweepy&lt;/a&gt; library is good enough. &lt;code&gt;twitter_list_mgmt&lt;/code&gt; just adds extra functionality on top of Tweepy to make working with lists easier.&lt;/p&gt;

&lt;p&gt;This package will help heavy twitter and tweetdeck users, especially those who use lists to manage the firehose of information from social media.&lt;/p&gt;

&lt;h3&gt;
  
  
  List of functions
&lt;/h3&gt;

&lt;p&gt;Here's what you can do with the &lt;code&gt;twitter_list_mgmt&lt;/code&gt; package:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Main functions

&lt;ul&gt;
&lt;li&gt;Add members to your list from another list &lt;small&gt;(link)&lt;/small&gt;
&lt;/li&gt;
&lt;li&gt;Add members to your list from multiple lists &lt;small&gt;(link)&lt;/small&gt;
&lt;/li&gt;
&lt;li&gt;Remove members from your list who are in another list &lt;small&gt;(link)&lt;/small&gt;
&lt;/li&gt;
&lt;li&gt;Remove members from your list who are in any of multiple other lists &lt;small&gt;(link)&lt;/small&gt;
&lt;/li&gt;
&lt;li&gt;Create a new list that combines members from multiple lists &lt;small&gt;(link)&lt;/small&gt;
&lt;/li&gt;
&lt;li&gt;Create a new list that has members common to multiple lists &lt;small&gt;(link)&lt;/small&gt;
&lt;/li&gt;
&lt;li&gt;Create a new list with members from a list, who aren't in any of multiple other lists &lt;small&gt;(link)&lt;/small&gt;
&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;Other functions

&lt;ul&gt;
&lt;li&gt;Get the list id from a list url &lt;small&gt;(link)&lt;/small&gt;
&lt;/li&gt;
&lt;li&gt;Get all the user ids of list members &lt;small&gt;(link)&lt;/small&gt;
&lt;/li&gt;
&lt;li&gt;Add user ids to a list &lt;small&gt;(link)&lt;/small&gt;
&lt;/li&gt;
&lt;li&gt;Remove user ids from a list &lt;small&gt;(link)&lt;/small&gt;
&lt;/li&gt;
&lt;li&gt;Create a pandas dataframe from a list &lt;small&gt;(link)&lt;/small&gt;
&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  How to install the package and set things up
&lt;/h3&gt;

&lt;p&gt;Versions of Tweepy &amp;gt;= 4.0.0a0 are required for this package to work. At the time of writing, 4.0.0 is not available in &lt;a href="https://pypi.org/project/tweepy/#history"&gt;pypi&lt;/a&gt;. Install it from the terminal by doing&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pip install git+https://github.com/tweepy/tweepy.git
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then install the main package by going to the terminal and typing&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pip install twitter_list_mgmt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In terms of setting up, you'll have to &lt;a href="https://developer.twitter.com/"&gt;create&lt;/a&gt; authentication credentials for yourself. (This &lt;a href="https://realpython.com/twitter-bot-python-tweepy/"&gt;article&lt;/a&gt; from Realpython has a how-to on it.) Four text strings will be generated -- Consumer Key, Consumer Secret, Access Token and Access Token Secret. Create a file named 'config_twitter.ini', use the format below and paste in the credentials without apostrophes. You can also download a sample file &lt;a href="https://github.com/shijithpk/twitter_list_mgmt/blob/master/twitter_list_mgmt/config_twitter.ini"&gt;here&lt;/a&gt;. Place the config in the same directory and on the same level as your script.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[info]
CONSUMER_KEY = XXXXXX
CONSUMER_SECRET = XXXXXX
ACCESS_TOKEN = XXXXXX
ACCESS_TOKEN_SECRET = XXXXXX
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  How to use the package
&lt;/h3&gt;

&lt;p&gt;Import the package into your code with&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import twitter_list_mgmt as tlm
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The package has &lt;strong&gt;7&lt;/strong&gt; main functions:  &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1.&lt;/strong&gt; &lt;a&gt;&lt;/a&gt;&lt;strong&gt;Add members to your list from another list&lt;/strong&gt; — Here 'list1' and 'list2' are twitter list ids, with list1 being the one you own. (You can get the ids from the url for a list page. For example, in the url &lt;a href="https://twitter.com/i/lists/15299140"&gt;https://twitter.com/i/lists/15299140&lt;/a&gt;, the list id is '15299140'.)&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;tlm.add_to_list1_from_list2(list1, list2)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;2.&lt;/strong&gt; &lt;a&gt;&lt;/a&gt;&lt;strong&gt;Add members to your list from several other lists&lt;/strong&gt; — 'multiple_lists' is a python list of twitter list ids. (To comply with Twitter's rate limits, only upto 1000 members can be added in a day.)&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;tlm.add_to_list1_from_multiple_lists(list1, 
                            multiple_lists)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;3.&lt;/strong&gt; &lt;a&gt;&lt;/a&gt;&lt;strong&gt;Remove members from your list who are in another list&lt;/strong&gt; — Let's say you have a twitter list on covid that's a mix of experts and journalists, and you want it to have experts only. Now you can remove many of the journalists from it manually, but you can also do it in an automated fashion by getting a list of science/health journalists. Using this function, if any of your list members are on that journalist list, they'll be removed. 'list1' here is your list id.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;tlm.remove_from_list1_based_on_list2(list1, list2)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;4.&lt;/strong&gt; &lt;a&gt;&lt;/a&gt;&lt;strong&gt;Remove members from your list who are in any of the other lists specified&lt;/strong&gt; — 'list1' here is your list id and 'multiple_lists' is a python list of twitter list ids.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;tlm.remove_from_list1_based_on_multiple_lists(list1,
                                    multiple_lists)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;5.&lt;/strong&gt; &lt;a&gt;&lt;/a&gt;&lt;strong&gt;Create a new list that combines members from several lists&lt;/strong&gt; — 'multiple_lists' is the python list containing the twitter list ids and 'list_name' is the name for the new list. (The Twitter list created is set as 'private' but can be made 'public' later.)&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;tlm.create_list_union(multiple_lists,list_name)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;6.&lt;/strong&gt; &lt;a&gt;&lt;/a&gt;&lt;strong&gt;Create a new list that has members common to several lists&lt;/strong&gt; — 'multiple_lists' is the python list containing the twitter list ids and 'list_name' is the name for the new list.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;tlm.create_list_intersection(multiple_lists,list_name)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;7.&lt;/strong&gt; &lt;a&gt;&lt;/a&gt;&lt;strong&gt;Create a new list with all the members from a list, who aren't in any of the other lists specified&lt;/strong&gt; — 'list1' can be your own list or someone else's, 'multiple_lists' is a python list of twitter list ids and 'list_name' is the name for the new list.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;tlm.create_list_difference(list1,multiple_lists,
                                    list_name)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Other things you can do
&lt;/h3&gt;

&lt;p&gt;The functions that have been listed are the main ones. There are others too, but most people won't need them. Will go through some of those functions for coders who want to build something on top of them. (Go through &lt;a href="https://github.com/shijithpk/twitter_list_mgmt/blob/master/twitter_list_mgmt/helpers.py"&gt;helpers.py&lt;/a&gt; in the github repo to see how they've been defined.)&lt;/p&gt;

&lt;p&gt;These are some of the other functions:  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a&gt;&lt;/a&gt;&lt;strong&gt;Get the list id from a list url&lt;/strong&gt; — Extracts the list_id and returns it as a string.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;tlm.get_list_id_from_url(url)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;a&gt;&lt;/a&gt;&lt;strong&gt;Get all the members of a list&lt;/strong&gt; — The function returns a python list of their user ids.  Tweepy has a similar function &lt;a href="https://docs.tweepy.org/en/latest/api.html#tweepy.API.get_list_members"&gt;&lt;code&gt;get_list_members&lt;/code&gt;&lt;/a&gt; but that retrieves user objects. This function goes a step further by extracting the user ids within those objects.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;tlm.get_list_members_ids(list_idx)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;a&gt;&lt;/a&gt;&lt;strong&gt;Add user ids to a list&lt;/strong&gt; — 'ids' here is a python list of user ids and 'list1' is a twitter list id.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;tlm.add_ids_to_list(ids,list1)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;a&gt;&lt;/a&gt;&lt;strong&gt;Remove user ids from a list&lt;/strong&gt; — 'ids' here is a python list of user ids and 'list1' is a twitter list id.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;tlm.remove_ids_from_list(ids,list1)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;a&gt;&lt;/a&gt;&lt;strong&gt;Create a pandas dataframe from a list&lt;/strong&gt; — Here, each row is for a different member and each column an attribute like number of followers, number of tweets posted etc. This is for anyone who wants to analyze the membership of a list.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;tlm.create_df_from_list(list_idx)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Suggestions, criticism etc.
&lt;/h3&gt;

&lt;p&gt;I'm not a professional developer/programmer/coder, so am sure there are things here I should be doing differently. If you have any suggestions, please contact me on &lt;a href="mailto:mail@shijith.com"&gt;mail@shijith.com&lt;/a&gt; or at my twitter handle &lt;a href="https://twitter.com/shijith"&gt;@shijith&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;For example, I would be interested in hearing about my python application layout. Whether it could be simplified further, if I could be doing imports better etc.&lt;/p&gt;

</description>
      <category>python</category>
      <category>twitter</category>
      <category>lifehack</category>
      <category>tweepy</category>
    </item>
    <item>
      <title>Finding new music on Spotify by aggregating the choices of tastemakers</title>
      <dc:creator>Shijith Kunhitty</dc:creator>
      <pubDate>Tue, 22 Jun 2021 09:54:34 +0000</pubDate>
      <link>https://forem.com/shijith/finding-new-music-on-spotify-by-aggregating-the-choices-of-tastemakers-3djb</link>
      <guid>https://forem.com/shijith/finding-new-music-on-spotify-by-aggregating-the-choices-of-tastemakers-3djb</guid>
      <description>&lt;h3&gt;
  
  
  TLDR
&lt;/h3&gt;

&lt;p&gt;I'm an amateur python coder and I write here about trying to make it easier to find new music. I do this by essentially combining playlists from influential music websites and radio stations into a single one on Spotify. &lt;/p&gt;

&lt;p&gt;Have decided to do this and not use Spotify's human-curated and algorithmic playlists because they lack authority for me.&lt;/p&gt;

&lt;p&gt;The simple python script I've written for aggregating playlists is in this &lt;a href="https://github.com/shijithpk/music-discovery"&gt;Github repo&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;If you don't want to code anything and just want the music, you have two options:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Follow a &lt;a href="https://open.spotify.com/playlist/0kqXhlpDiRbab64ip8g8Ap"&gt;demo playlist&lt;/a&gt; created using the default choices.&lt;/li&gt;
&lt;li&gt;Follow my &lt;a href="https://open.spotify.com/playlist/3XidTKBIpsGymPCjlN7kZH"&gt;personal playlist&lt;/a&gt; that mines 33 sources of new music.
&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  My earlier routine for finding music
&lt;/h3&gt;

&lt;p&gt;When it comes to finding new music, my usual sources were Spotify playlists, online radio streams and YouTube channels. I love music, but going through each of them is difficult to do every week. &lt;/p&gt;

&lt;p&gt;Having to visit each individual website, realizing that "Oh, I didn't go to &lt;a href="https://livesessions.npr.org/"&gt;NPR Live Sessions&lt;/a&gt; last week, so got to do it this week". The very fact that I call it a 'routine' shows how it had become a chore for me, a sequence of steps to follow every week. &lt;/p&gt;

&lt;p&gt;So I've decided to simplify my music discovery process, and make it less of a 'routine' by collecting all the new music I should be listening to in one Spotify playlist. Reduce those multiple steps into a single one, stick to that one playlist and be happy with that.&lt;/p&gt;

&lt;p&gt;What I've done is I've mined various playlists on Spotify that look at the new music that's released every week. These playlists are from radio stations like &lt;a href="https://www.kcrw.com/"&gt;KCRW&lt;/a&gt; and BBC &lt;a href="//bbc.co.uk/6music"&gt;Radio 6&lt;/a&gt;, music websites like &lt;a href="https://pitchfork.com/"&gt;Pitchfork&lt;/a&gt; and &lt;a href="https://www.thelineofbestfit.com/"&gt;Line of Best Fit&lt;/a&gt;, and traditional publications like &lt;a href="https://www.rollingstone.com/"&gt;Rolling Stone&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--MNDMV1us--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/IeVSUtI.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--MNDMV1us--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/IeVSUtI.jpg" alt="Logos of music tastemakers"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;These are stations, websites and publications that care about music and are considered tastemakers in the US and UK. And by aggregating their choices, I get to benefit from their collective musical wisdom in one playlist without investing hours of my time.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why I'm not using Spotify's own playlists
&lt;/h3&gt;

&lt;p&gt;If you're a Spotify obsessive, you could point out that it has its own playlists, human-curated ones like '&lt;a href="https://open.spotify.com/playlist/37i9dQZF1DX4JAvHpjipBk"&gt;New Music Friday&lt;/a&gt;' and algorithmic ones like 'Release Radar' that specifically look at the new music released in the week. So why reinvent the wheel?&lt;/p&gt;

&lt;p&gt;The thing is the websites and stations whose playlists I'm aggregating are widely respected. I may not like some of the songs these tastemakers recommend, but it's important for me to hear these recommendations and then maybe reject them, than to never hear them at all.&lt;/p&gt;

&lt;p&gt;They were also part of my routine earlier, so it's important to me that they remain part of my music discovery process.&lt;/p&gt;

&lt;p&gt;No doubt, Spotify's own playlists are very &lt;a href="https://www.theguardian.com/music/2019/apr/28/streaming-music-algorithms-spotify"&gt;influential&lt;/a&gt; and the curators behind them have become minor &lt;a href="https://edmreviewer.com/2020/04/20/austin-kramer-the-god-of-edm/"&gt;celebrities&lt;/a&gt; in their own right. But since these playlists aren't from established sources of musical authority or from institutions I'm familiar with, I value their judgement a little less.&lt;/p&gt;

&lt;h3&gt;
  
  
  If you want to rely less on Spotify's algorithms
&lt;/h3&gt;

&lt;p&gt;To be clear, I'm not exactly a 'down with algorithms' guy.  If your issue with Spotify's algorithmic playlists is that there is a sameness to the music, that you're not getting exposed to different artists, and you fear you'll end up in a musical &lt;a href="https://www.reddit.com/r/LetsTalkMusic/comments/g8m4m2/spotify_radio_from_song_or_album_is_it_just_me_or/"&gt;filter bubble&lt;/a&gt;, my feeling is these issues are correctable. The algorithms can be tweaked to make Spotify's recommendations more diverse. &lt;/p&gt;

&lt;p&gt;But if you've made up your mind about Spotify and want to rely less on its algorithms, you can use the script I've put up on &lt;a href="https://github.com/shijithpk/music-discovery"&gt;Github&lt;/a&gt; to generate musically varied playlists.&lt;/p&gt;

&lt;p&gt;I'm aggregating playlists from tastemakers in my script, but you can collect playlists from any user you find on Spotify. It doesn't have to just be for new music either. For example, you could aggregate acoustic music playlists from various users to get a new acoustic playlist every week.&lt;/p&gt;

&lt;h3&gt;
  
  
  The gap this tool fills
&lt;/h3&gt;

&lt;p&gt;The internet isn't short of playlist creation tools for Spotify. The thing is most of them are &lt;a href="https://dubolt.com/"&gt;about&lt;/a&gt; generating playlists of music based on a song or artist you seed it with. Or generating playlists based on a &lt;a href="http://playlistminer.playlistmachinery.com/"&gt;keyword&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;This script tries to do something different by generating a playlist based on your choice of musical authority. And also update it every week, once you schedule it that way. For most tools (with one &lt;a href="https://mixtapemanager.ca/"&gt;exception&lt;/a&gt;), playlist generation is a one-time exercise with no updates.&lt;/p&gt;

&lt;p&gt;One website that tries to aggregate tastemaker preferences like this is &lt;a href="https://hypem.com"&gt;Hype Machine&lt;/a&gt;. It collects recommendations from hundreds of music websites, blogs etc. and has its own interface for listening to music. The thing is, for many people their musical world is centred around Spotify and Apple Music, but Hype Machine isn't integrated with those apps.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://hypem.com/latest"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--A8VKB4PP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/cHg3Zxu.png" alt="Screenshot of Hype Machine"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  How it's implemented
&lt;/h3&gt;

&lt;p&gt;There isn't anything sophisticated being done here, it's just a python script. But hopefully this will meet the needs of &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;amateur coders who want to spend less time finding new music&lt;/li&gt;
&lt;li&gt;lifehackers who want to automate aspects of their lives and, &lt;/li&gt;
&lt;li&gt;in general, anyone who wants to simplify their Spotify experience.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;There are 75 playlists users can choose to aggregate. They're all new music playlists, updated every week/month, from important music publications, websites and radio stations in the US and UK. While most of the playlists explore new music across genres, some are genre-specific, some focus on new music from emerging artists, while others focus on tracks from new albums. &lt;/p&gt;

&lt;p&gt;6 playlists (from Pitchfork, Rolling Stone, KCRW in the US and Line of Best Fit, NME, BBC Radio 6 in the UK) have been pre-selected to give a user default choices to start with, but they can be un-selected.&lt;/p&gt;

&lt;p&gt;If you follow the instructions in the &lt;a href="https://github.com/shijithpk/music-discovery"&gt;Github repo&lt;/a&gt;, you'll end up with a playlist titled 'New Music for &amp;lt; your Spotify user id &amp;gt;' in your Spotify library.&lt;/p&gt;

&lt;p&gt;A demo playlist created using the six default choices is &lt;a href="https://open.spotify.com/playlist/0kqXhlpDiRbab64ip8g8Ap"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://open.spotify.com/playlist/0kqXhlpDiRbab64ip8g8Ap"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ExlBHPOI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/bSFVTKa.png" alt="Screenshot of Spotify playlist"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Don't turn music into work
&lt;/h3&gt;

&lt;p&gt;Note that your playlist is wiped clean and new tracks are added every time you run the script. So you'll need to get through the songs on the playlist before you run the script again. &lt;/p&gt;

&lt;p&gt;You don't have to make it a chore though, or get anxious about finishing the playlist. Just have it running in the background while you're working or browsing, 'like' songs to add them to your liked songs list, and skip liberally. &lt;/p&gt;

&lt;p&gt;There's &lt;a href="https://www.theverge.com/2020/5/26/21270409/spotify-song-library-limit-removed-music-downloads-playlists-feature"&gt;no limit&lt;/a&gt; in Spotify to how many songs you can like. You can then decide later what you want to do with your liked songs. Put some on a workout playlist, others on an office playlist etc.&lt;/p&gt;

&lt;h3&gt;
  
  
  For more details
&lt;/h3&gt;

&lt;p&gt;The code, and more details about the implementation are available in the &lt;a href="https://github.com/shijithpk/music-discovery"&gt;Github repo&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Hopefully, this tool will give people a model to build on, and create even better setups for finding new music.&lt;/p&gt;

</description>
      <category>python</category>
      <category>spotify</category>
      <category>automation</category>
      <category>lifehack</category>
    </item>
  </channel>
</rss>
