Update lib.py
Merge pull request #1 from robhudson/patch-1

Update to pass categories by slug