slight tweaks & reqs file

This commit is contained in:
rra 2021-07-09 11:17:35 +02:00
parent 5a6bb53584
commit 49e2247776
3 changed files with 15 additions and 4 deletions

View File

@ -7,7 +7,7 @@ video_duration: "{{ v.duration | duration }} "
video_channel: "{{ v.channel.display_name }}"
channel_url: "{{ v.channel.url }}"
preview_image: "{{ preview_image }}"
category: "tv"
category: ["tv","{{ v.channel.display_name }}""]
---

12
requirements.txt Normal file
View File

@ -0,0 +1,12 @@
# Automatically generated by https://github.com/damnever/pigar.
# video_feed/streams-feed.py: 7
# video_feed/video-feed.py: 7
Jinja2 == 2.10
# video_feed/streams-feed.py: 6
# video_feed/video-feed.py: 6
peertube == 1.0.0
# video_feed/video-feed.py: 12
requests == 2.21.0

View File

@ -35,7 +35,6 @@ env = jinja2.Environment(
)
env.filters['duration'] = duration
env.filters['linebreaks'] = linebreaks
env.filters['slugify'] = slugify
host = 'https://tv.lumbung.space'
@ -47,7 +46,7 @@ client = peertube.ApiClient(configuration)
v = peertube.VideoApi(client)
response = v.videos_get(count=1000, filter='local', tags_one_of='publish')
response = v.videos_get(count=100, filter='local', tags_one_of='publish')
videos = response.to_dict()
videos = videos['data']
@ -84,7 +83,7 @@ def create_post(post_directory, video_metadata):
output_dir = '/home/r/Programming/lumbung.space/ssg_experiment/content/video'
output_dir = '/home/r/Programming/lumbung.space/lumbung.space-web/content/video'
if not os.path.exists(output_dir):
os.mkdir(output_dir)