diff options
author | jwansek <eddie.atten.ea29@gmail.com> | 2019-01-08 20:35:12 +0000 |
---|---|---|
committer | jwansek <eddie.atten.ea29@gmail.com> | 2019-01-08 20:35:12 +0000 |
commit | 5a8e9a81889b2c1520d68fbd1fd5e787a273113b (patch) | |
tree | 9af88b813a7b5bb42725c7d51cf47405a2cdba76 /test_ytapi.py | |
parent | 332ae56f3a241a89dddc920523c156d909aa1d36 (diff) | |
parent | 7937aadec4389bfe96d3d80cfad50312efa2e5d9 (diff) | |
download | SmallYTChannelBot-5a8e9a81889b2c1520d68fbd1fd5e787a273113b.tar.gz SmallYTChannelBot-5a8e9a81889b2c1520d68fbd1fd5e787a273113b.zip |
updated database
Diffstat (limited to 'test_ytapi.py')
-rw-r--r-- | test_ytapi.py | 50 |
1 files changed, 2 insertions, 48 deletions
diff --git a/test_ytapi.py b/test_ytapi.py index 44f439f..622fda9 100644 --- a/test_ytapi.py +++ b/test_ytapi.py @@ -5,7 +5,7 @@ import ytapi reddit = login.REDDIT -subreddit = reddit.subreddit("jwnskanzkwktest") +subreddit = reddit.subreddit("SmallYTChannel") tail = "\n\n\n ^/u/SmallYTChannelBot ^*made* ^*by* ^/u/jwnskanzkwk. ^*PM* ^*for* ^*bug* ^*reports.* ^*For* ^*more* ^*information,* ^*read* ^*the* ^[FAQ.](https://www.reddit.com/user/SmallYTChannelBot/comments/a4u7qj/smallytchannelbot_faq/)" @@ -20,50 +20,4 @@ while True: if "/" not in ytid: ytdata = ytapi.get_video_data(ytid) - text += """ -\n\n\n##Video data: - -Field|Data -:-|:- -Title|%s -Thumbnail|[Link](%s) -Views|%s -Length|%s -Likes/Dislikes|%s/%s -Comments|%s -Description|%s - -##Channel Data: - -Field|Data -:-|:- -Name|%s -Thumbnail|[Link](%s) -Subscribers|%s -Videos|%s -Views|%s - - """ % ( - ytdata["title"], - ytdata["thumbnail"], - ytdata["views"], - ytdata["length"], - ytdata["likes"], - ytdata["dislikes"], - ytdata["comments"], - ytdata["description"], - ytdata["channel"], - ytdata["channelThumb"], - ytdata["subscribers"], - ytdata["videos"], - ytdata["channelViews"] - ) - - curflair = submission.link_flair_text - if str(curflair) != "None": - submission.mod.flair(" %s | %s | :youtube: %s" % (curflair, ytdata["length"], ytdata["channel"])) - else: - submission.mod.flair("%s | :youtube: %s" % (ytdata["length"], ytdata["channel"])) - - reply = submission.reply(text + tail) - reply.mod.distinguish(sticky = True) + print(ytdata["length"], submission.url) |