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.

48 lines
880 B

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