Skip to content

Commit

Permalink
Merge pull request #786 from martgnz/youbike-retire-v1
Browse files Browse the repository at this point in the history
Retire Youbike v1 feed
  • Loading branch information
eskerda authored Jan 16, 2025
2 parents 9526f69 + f3e963e commit bbda1ba
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 bbda1ba

Please sign in to comment.