change button to popover, init Radio_Control

This commit is contained in:
death916 2025-12-10 02:10:30 -08:00
parent b71911d7ab
commit 7d0a0cdfa6
5 changed files with 34 additions and 34 deletions

View file

@ -1,10 +1,11 @@
import feedparser
import asyncio
import aiofiles
import random
from time import localtime, strftime
import socket
from time import localtime, strftime
import aiofiles
import aiohttp
import feedparser
def print_time():
@ -13,11 +14,11 @@ def print_time():
class News:
def __init__(self):
socket.setdefaulttimeout(10) # Set default timeout for socket operations
socket.setdefaulttimeout(10)
async def _fetch_feed(self, session, feed):
"""Fetches and parses a single feed asynchronously."""
max_entries = 10 # Maximum number of entries to fetch from each feed
max_entries = 10
try:
# Add timeout to the request
@ -38,7 +39,7 @@ class News:
# Limit the number of entries parsed
for i, post in enumerate(d.entries):
if i >= max_entries:
break # Stop parsing if we've reached the limit
break
feed_entries.append(
{