Skip to content

Commit ec3d25d

Browse files
Update comment_scraper.py (#94)
The comment scraper example resulted in a 404 error because comments.get() needed to be replaced with comments.list()
1 parent 2598820 commit ec3d25d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/comments/comment_scraper.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def build_comments_list(client, asset_id, comment_list):
3333
build_comments_list(client, asset['id'], comment_list)
3434

3535
if asset.get('type') == 'file' and asset.get('comment_count') > 0:
36-
comments = client.comments.get(asset['id'])
36+
comments = client.comments.list(asset['id'])
3737
for comment in comments:
3838
# The 'get_comments" call won't return the asset name
3939
# So we'll add it to the dictionary now.
@@ -44,7 +44,7 @@ def build_comments_list(client, asset_id, comment_list):
4444
# Read about version stacks: https://docs.frame.io/docs/managing-version-stacks
4545
versions = client.assets.get_children(asset['id'])
4646
for v_asset in versions:
47-
comments = client.comments.get(v_asset['id'])
47+
comments = client.comments.list(v_asset['id'])
4848
for comment in comments:
4949
comment['asset'] = { 'name': asset['name'] }
5050
comment_list.append(comment)

0 commit comments

Comments
 (0)