Skip to content

Commit

Permalink
Retire Youbike v1 feed
Browse files Browse the repository at this point in the history
  • Loading branch information
martgnz committed Jan 16, 2025
1 parent 0668c56 commit f3e963e
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions pybikes/youbike.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@


class YouBikeTw(BikeShareSystem):
FEED_URL_V1 = "https://apis.youbike.com.tw/json/station-yb1.json"
FEED_URL_V2 = "https://apis.youbike.com.tw/json/station-yb2.json"

unifeed = True
Expand All @@ -26,10 +25,7 @@ def __init__(self, tag, meta, uid):

def update(self, scraper=None):
scraper = scraper or PyBikesScraper()
v1 = json.loads(scraper.request(self.FEED_URL_V1))
v2 = json.loads(scraper.request(self.FEED_URL_V2))

data = v1 + v2
data = json.loads(scraper.request(self.FEED_URL_V2))
data = filter(
lambda item: item.get("area_code") == self.uid
and item.get("lat") != ""
Expand Down

0 comments on commit f3e963e

Please sign in to comment.