diff --git a/listing.py b/listing.py index de451f9..48f997e 100644 --- a/listing.py +++ b/listing.py @@ -61,6 +61,7 @@ class YahooAuctionsItem: self.favourite = None self.end_date = None self.bids = 0 + self.automatic_extension = None if url == None and from_json != None and id != None: self.id = id @@ -92,6 +93,11 @@ class YahooAuctionsItem: r = requests.get(f"https://page.auctions.yahoo.co.jp/jp/auction/{self.id}").text # r = open("yahoo.html").read() j = json.loads(re.match(r'.*var pageData ?= ?(\{.*?\});', r, re.DOTALL).group(1)) + ae = re.match(r'自動延長.+\n.+>(.+)<.+', r) + if ae != None: + ae = re.group(1) + self.automatic_extension = (ae == "あり") + except: raise diff --git a/ui/main.glade b/ui/main.glade index dc02d85..ea1acf4 100644 --- a/ui/main.glade +++ b/ui/main.glade @@ -18,7 +18,7 @@ The Stinchinator - + ¥599 $5.99 7 hours 12345 @@ -565,6 +565,60 @@ 0 + + + True + False + start + Buy it now? + + + 0 + 5 + + + + + True + False + start + Auto extension? + + + 0 + 6 + + + + + True + False + end + Yes + + + 2 + 5 + + + + + True + False + end + N/A + + + 2 + 6 + + + + + + + +