Fixing bugs
This commit is contained in:
parent
c3be26fa51
commit
36c980d94f
|
@ -19,7 +19,10 @@ def cars_in_traffic(context: Context) -> Prediction:
|
|||
for lel in data['result']['records']:
|
||||
sum += lel['vehicleCount']
|
||||
len += 1
|
||||
if sum > 0:
|
||||
curr_avg = len / sum
|
||||
else:
|
||||
curr_avg = 0
|
||||
|
||||
diff = day_avr - night_avr
|
||||
|
||||
|
|
11
server/nightr/strategies/just_eat.py
Normal file
11
server/nightr/strategies/just_eat.py
Normal file
|
@ -0,0 +1,11 @@
|
|||
import requests
|
||||
from bs4 import BeautifulSoup
|
||||
|
||||
|
||||
def is_restaurant_open(name):
|
||||
r = requests.get("https://www.just-eat.dk/area/8000-%C3%A5rhusc")
|
||||
soup = BeautifulSoup(r.content, features='html5lib')
|
||||
|
||||
print(soup.find('div', {'data-test-id': 'listingGroupOpen'}))
|
||||
|
||||
is_restaurant_open("stop2shop")
|
Loading…
Reference in New Issue
Block a user