Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
# <bitbar.title>Cotton Bureau Sales</bitbar.title>
# <bitbar.version>v2.0</bitbar.version>
# <>Matan Kushner</>
# <>matchai</>
# <bitbar.desc>Checks Cotton Bureau page for the number of sales</bitbar.desc>
# <bitbar.dependencies>python</bitbar.dependencies>
# <bitbar.emojize>true</bitbar.emojize>
import urllib.request, json, time
with urllib.request.urlopen("") as url:
data =
start = "\"sold\":"
end = ","
firstChar = data.find(start)
lastChar = data.find(end, firstChar)
number_of_sales = data[firstChar + len(start):lastChar]
print(":shirt:: " + number_of_sales)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.