|
|
|
@ -4,6 +4,7 @@ import requests
|
|
|
|
|
import re
|
|
|
|
|
from bs4 import BeautifulSoup
|
|
|
|
|
from datetime import datetime, timedelta
|
|
|
|
|
from random import randrange
|
|
|
|
|
|
|
|
|
|
import asyncio
|
|
|
|
|
from nio import ClientConfig, AsyncClient, LoginResponse, InviteEvent
|
|
|
|
@ -171,7 +172,8 @@ async def main():
|
|
|
|
|
state_key=category,
|
|
|
|
|
content={'url_list': cache})
|
|
|
|
|
|
|
|
|
|
next_update = datetime.now() + timedelta(minutes=15)
|
|
|
|
|
# wait between 15min and 30min to randomize scraping
|
|
|
|
|
next_update = datetime.now() + timedelta(minutes=randrange(15, 30))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
homeserver = environ['HOMESERVER']
|
|
|
|
|