Skip to content

Commit 9237e71

Browse files
authored
Merge pull request #737 from Altonss/fix-ortenaukreis
Fix nextbike ortenaukreis
2 parents 59661d4 + 7dfba7c commit 9237e71

File tree

3 files changed

+73
-83
lines changed

3 files changed

+73
-83
lines changed

pybikes/data/gbfs.json

+69-57
Original file line numberDiff line numberDiff line change
@@ -1265,63 +1265,75 @@
12651265
"feed_url": "https://app.kotobike.jp/api/exposed/v2/gbfs/gbfs.json"
12661266
},
12671267
{
1268-
"tag": "aw-bike",
1269-
"meta": {
1270-
"name": "AW-bike Ahrweiler",
1271-
"city": "Ahrweiler",
1272-
"country": "DE",
1273-
"latitude": 50.5452,
1274-
"longitude": 7.1212,
1275-
"company": [
1276-
"nextbike GmbH"
1277-
]
1278-
},
1279-
"feed_url": "https://gbfs.nextbike.net/maps/gbfs/v2/nextbike_rh/gbfs.json"
1280-
},
1281-
{
1282-
"tag": "famose",
1283-
"meta": {
1284-
"name": "Fa.Mo.Se",
1285-
"city": "Senigallia",
1286-
"country": "IT",
1287-
"latitude": 43.7603,
1288-
"longitude": 13.1139,
1289-
"company": [
1290-
"Comuni di Senigallia e Mondolfo",
1291-
"TIER Mobility SE"
1292-
]
1293-
},
1294-
"feed_url": "https://gbfs.nextbike.net/maps/gbfs/v2/nextbike_fa/gbfs.json"
1295-
},
1296-
{
1297-
"tag": "metrorower",
1298-
"meta": {
1299-
"name": "Metrorower",
1300-
"city": "Górnośląsko-Zagłębiowska Metropolia",
1301-
"country": "PL",
1302-
"latitude": 50.2664,
1303-
"longitude": 19.0217,
1304-
"company": [
1305-
"Górnośląsko-Zagłębiowska Metropolia",
1306-
"Nextbike GZM"
1307-
]
1308-
},
1309-
"feed_url": "https://gbfs.nextbike.net/maps/gbfs/v2/nextbike_zz/gbfs.json"
1310-
},
1311-
{
1312-
"tag": "velhop",
1313-
"meta": {
1314-
"latitude": 48.583611,
1315-
"city": "Strasbourg",
1316-
"name": "Vélhop",
1317-
"longitude": 7.748056,
1318-
"country": "FR",
1319-
"company": [
1320-
"Strasbourg Mobilités"
1321-
]
1322-
},
1323-
"feed_url": "https://gbfs.nextbike.net/maps/gbfs/v2/nextbike_ae/gbfs.json"
1324-
}
1268+
"tag": "aw-bike",
1269+
"meta": {
1270+
"name": "AW-bike Ahrweiler",
1271+
"city": "Ahrweiler",
1272+
"country": "DE",
1273+
"latitude": 50.5452,
1274+
"longitude": 7.1212,
1275+
"company": [
1276+
"nextbike GmbH"
1277+
]
1278+
},
1279+
"feed_url": "https://gbfs.nextbike.net/maps/gbfs/v2/nextbike_rh/gbfs.json"
1280+
},
1281+
{
1282+
"tag": "famose",
1283+
"meta": {
1284+
"name": "Fa.Mo.Se",
1285+
"city": "Senigallia",
1286+
"country": "IT",
1287+
"latitude": 43.7603,
1288+
"longitude": 13.1139,
1289+
"company": [
1290+
"Comuni di Senigallia e Mondolfo",
1291+
"TIER Mobility SE"
1292+
]
1293+
},
1294+
"feed_url": "https://gbfs.nextbike.net/maps/gbfs/v2/nextbike_fa/gbfs.json"
1295+
},
1296+
{
1297+
"tag": "metrorower",
1298+
"meta": {
1299+
"name": "Metrorower",
1300+
"city": "Górnośląsko-Zagłębiowska Metropolia",
1301+
"country": "PL",
1302+
"latitude": 50.2664,
1303+
"longitude": 19.0217,
1304+
"company": [
1305+
"Górnośląsko-Zagłębiowska Metropolia",
1306+
"Nextbike GZM"
1307+
]
1308+
},
1309+
"feed_url": "https://gbfs.nextbike.net/maps/gbfs/v2/nextbike_zz/gbfs.json"
1310+
},
1311+
{
1312+
"tag": "velhop",
1313+
"meta": {
1314+
"latitude": 48.583611,
1315+
"city": "Strasbourg",
1316+
"name": "Vélhop",
1317+
"longitude": 7.748056,
1318+
"country": "FR",
1319+
"company": ["Strasbourg Mobilités"]
1320+
},
1321+
"feed_url": "https://gbfs.nextbike.net/maps/gbfs/v2/nextbike_ae/gbfs.json"
1322+
},
1323+
{
1324+
"tag": "nextbike-ortenaukreis",
1325+
"meta": {
1326+
"name": "Nextbike Ortenaukreis",
1327+
"city": "Ortenaukreis",
1328+
"country": "DE",
1329+
"latitude": 48.4721,
1330+
"longitude": 7.94243,
1331+
"company": [
1332+
"nextbike GmbH"
1333+
]
1334+
},
1335+
"feed_url": "https://gbfs.nextbike.net/maps/gbfs/v2/nextbike_eh/gbfs.json"
1336+
}
13251337
],
13261338
"system": "gbfs",
13271339
"class": "Gbfs"

pybikes/data/nextbike.json

-22
Original file line numberDiff line numberDiff line change
@@ -314,17 +314,6 @@
314314
"longitude": 17.0485
315315
}
316316
},
317-
{
318-
"domain": "dl",
319-
"tag": "nextbike-offenburg",
320-
"city_uid": 155,
321-
"meta": {
322-
"city": "Offenburg",
323-
"country": "DE",
324-
"latitude": 48.4721,
325-
"longitude": 7.94243
326-
}
327-
},
328317
{
329318
"domain": "la",
330319
"tag": "nextbike-wrneustadt",
@@ -1220,17 +1209,6 @@
12201209
"longitude": 17.1994
12211210
}
12221211
},
1223-
{
1224-
"domain": "lr",
1225-
"tag": "lahr-pedelecs-lahr",
1226-
"city_uid": 505,
1227-
"meta": {
1228-
"city": "Lahr",
1229-
"country": "DE",
1230-
"latitude": 48.3396,
1231-
"longitude": 7.87376
1232-
}
1233-
},
12341212
{
12351213
"domain": "nu",
12361214
"tag": "lviv-odessa",

pybikes/gbfs.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -86,20 +86,20 @@ def update_cargo(station, vehicle, info):
8686
# contains pairs of (vehicle query, resolver)
8787
return [
8888
(
89-
lambda v: v['propulsion_type'] == 'human' and v['form_factor'] == 'bicycle',
89+
lambda v: 'propulsion_type' in v and v['propulsion_type'] == 'human' and v['form_factor'] == 'bicycle',
9090
update_normal_bikes
9191
),
9292
(
93-
lambda v: v['propulsion_type'] in ['electric_assist', 'electric'] and v['form_factor'] == 'bicycle',
93+
lambda v: 'propulsion_type' in v and v['propulsion_type'] in ['electric_assist', 'electric'] and v['form_factor'] == 'bicycle',
9494
update_ebikes
9595
),
9696
(
97-
lambda v: v['propulsion_type'] == 'human' and v['form_factor'] == 'cargo_bicycle',
97+
lambda v: 'propulsion_type' in v and v['propulsion_type'] == 'human' and v['form_factor'] == 'cargo_bicycle',
9898
update_cargo
9999
),
100100

101101
(
102-
lambda v: v['propulsion_type'] == 'electric_assist' and v['form_factor'] == 'cargo_bicycle',
102+
lambda v: 'propulsion_type' in v and v['propulsion_type'] == 'electric_assist' and v['form_factor'] == 'cargo_bicycle',
103103
update_ecargo
104104
),
105105
]

0 commit comments

Comments
 (0)