Skip to content

Commit

Permalink
Update for v5 of TikTokApi
Browse files Browse the repository at this point in the history
  • Loading branch information
dwoffinden committed Feb 14, 2022
1 parent b54d87e commit bc47116
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions postprocessing.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# Custom Domain
ghPagesURL = "https://daw.dev/tiktok-rss-flat/"

api = TikTokApi.get_instance()
api = TikTokApi()

count = 10

Expand All @@ -20,8 +20,6 @@

print (user)

tiktoks = api.by_username(user, count=count)

fg = FeedGenerator()
fg.id('https://tiktok.com/@' + user)
fg.title(user + ' TikTok')
Expand All @@ -35,7 +33,7 @@
# Set the last modification time for the feed to be the most recent post, else now.
updated=None

for tiktok in tiktoks:
for tiktok in api.user(username=user).videos(count=count):
fe = fg.add_entry()
link = "https://tiktok.com/@" + user + "/video/" + tiktok['id']
fe.id(link)
Expand Down

0 comments on commit bc47116

Please sign in to comment.