odysee-comment-api.py 610 B

123456789101112131415161718192021222324
  1. #!/usr/bin/env python
  2. import requests
  3. import json
  4. fetch = {
  5. "jsonrpc": "2.0",
  6. "id": 1,
  7. "method": "comment.List",
  8. "params": {
  9. "page":1,
  10. "top_level": False, # For comment replies
  11. "parent_id": "parent comment ID", # For comment replies
  12. "claim_id":"463e63afb35a319f260b36ef8d5c3dc41a98ce28",
  13. "page_size":99999,
  14. "channel_id":"ecf0a6be99030d0ad4e10aec11d2c0bab94246ae",
  15. "channel_name":"@MusicARetro"
  16. }
  17. }
  18. data = requests.post("https://comments.odysee.com/api/v2?m=comment.List", data = fetch)
  19. print(data.text)
  20. json_stuff = json.loads(data.text)
  21. print(json_stuff)