Scripting way to upload videos to peertube and youtube
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

52 lines
961 B

  1. #!/usr/bin/python
  2. # coding: utf-8
  3. ### FOR CATEGORIE ###
  4. YOUTUBE_CATEGORY = {
  5. "music": 10,
  6. "films": 1,
  7. "vehicles": 2,
  8. "sport": 17,
  9. "travels": 19,
  10. "gaming": 20,
  11. "people": 22,
  12. "comedy": 23,
  13. "entertainment": 24,
  14. "news": 25,
  15. "how to": 26,
  16. "education": 27,
  17. "activism": 29,
  18. "science & technology": 28,
  19. "science": 28,
  20. "technology": 28,
  21. "animals": 15
  22. }
  23. PEERTUBE_CATEGORY = {
  24. "music": 1,
  25. "films": 2,
  26. "vehicles": 3,
  27. "sport": 5,
  28. "travels": 6,
  29. "gaming": 7,
  30. "people": 8,
  31. "comedy": 9,
  32. "entertainment": 10,
  33. "news": 11,
  34. "how to": 12,
  35. "education": 13,
  36. "activism": 14,
  37. "science & technology": 15,
  38. "science": 15,
  39. "technology": 15,
  40. "animals": 16
  41. }
  42. ######################
  43. def getCategory(category, type):
  44. if type == "youtube":
  45. return YOUTUBE_CATEGORY[category.lower()]
  46. else:
  47. return PEERTUBE_CATEGORY[category.lower()]