Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
7ba556bc29
|
@ -19,7 +19,10 @@ def cars_in_traffic(context: Context) -> Prediction:
|
||||||
for lel in data['result']['records']:
|
for lel in data['result']['records']:
|
||||||
sum += lel['vehicleCount']
|
sum += lel['vehicleCount']
|
||||||
len += 1
|
len += 1
|
||||||
curr_avg = len / sum
|
if sum > 0:
|
||||||
|
curr_avg = len / sum
|
||||||
|
else:
|
||||||
|
curr_avg = 0
|
||||||
|
|
||||||
diff = day_avr - night_avr
|
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 a new issue