added columns for automatic extension and buy it now
This commit is contained in:
parent
e522c773b3
commit
0a73423195
2 changed files with 61 additions and 1 deletions
|
@ -61,6 +61,7 @@ class YahooAuctionsItem:
|
||||||
self.favourite = None
|
self.favourite = None
|
||||||
self.end_date = None
|
self.end_date = None
|
||||||
self.bids = 0
|
self.bids = 0
|
||||||
|
self.automatic_extension = None
|
||||||
|
|
||||||
if url == None and from_json != None and id != None:
|
if url == None and from_json != None and id != None:
|
||||||
self.id = id
|
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 = requests.get(f"https://page.auctions.yahoo.co.jp/jp/auction/{self.id}").text
|
||||||
# r = open("yahoo.html").read()
|
# r = open("yahoo.html").read()
|
||||||
j = json.loads(re.match(r'.*var pageData ?= ?(\{.*?\});', r, re.DOTALL).group(1))
|
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:
|
except:
|
||||||
raise
|
raise
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
<data>
|
<data>
|
||||||
<row>
|
<row>
|
||||||
<col id="0" translatable="yes">The Stinchinator</col>
|
<col id="0" translatable="yes">The Stinchinator</col>
|
||||||
<col id="1" translatable="yes"/>
|
<col id="1" translatable="yes">¥599</col>
|
||||||
<col id="2" translatable="yes">$5.99</col>
|
<col id="2" translatable="yes">$5.99</col>
|
||||||
<col id="3" translatable="yes">7 hours</col>
|
<col id="3" translatable="yes">7 hours</col>
|
||||||
<col id="4" translatable="yes">12345</col>
|
<col id="4" translatable="yes">12345</col>
|
||||||
|
@ -565,6 +565,60 @@
|
||||||
<property name="top_attach">0</property>
|
<property name="top_attach">0</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="halign">start</property>
|
||||||
|
<property name="label" translatable="yes">Buy it now?</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left_attach">0</property>
|
||||||
|
<property name="top_attach">5</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="halign">start</property>
|
||||||
|
<property name="label" translatable="yes">Auto extension?</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left_attach">0</property>
|
||||||
|
<property name="top_attach">6</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lblSelectedEnding1">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="halign">end</property>
|
||||||
|
<property name="label" translatable="yes">Yes</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left_attach">2</property>
|
||||||
|
<property name="top_attach">5</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lblSelectedEnding2">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="halign">end</property>
|
||||||
|
<property name="label" translatable="yes">N/A</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left_attach">2</property>
|
||||||
|
<property name="top_attach">6</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<placeholder/>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<placeholder/>
|
||||||
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<placeholder/>
|
<placeholder/>
|
||||||
</child>
|
</child>
|
||||||
|
|
Loading…
Reference in a new issue