私もかなりの時間を割いて、この質問の解決策を探していました。これは本当に古い質問ですが、もっと直接的な答えがあればいいのにと思います。何時間も節約できました。@Moazamは正しい考えを持っていましたが、実際には具体性が欠けていたので、ここに行きます. 次の回答は、 eBay の Apiに基づいて/使用して、python で書かれています。(これは、見つけたり実行したりするのがはるかに簡単だと思うでしょう)
from ebaysdk.trading import Connection as Trading
from ebaysdk.exception import ConnectionError
import bs4 as bs # beautifulsoup import for parsing xml
try:
api = Trading(config_file="ebay.yaml") #put ur eBay dev API credentials in yaml file
response = api.execute('GetSellerTransactions', {}) # dictionary response
dommy = response.content
except ConnectionError as e: # spit error if can't connect (ie: wrong api credz)
print(e)
print(e.response.dict())
soup = bs.BeautifulSoup(dommy, 'lxml') # parse the API response as xml
tArray = soup.transactionarray
with open('fullSoldLogXML.xml', 'w+') as xml: # Log file, not required.
xml.write(str(soup)) # write entire ebay response to log file.
with open('singleTransactions.xml', 'w+') as tranXml: # Another log. Personal reference.
tranXml.write(str(tArray)) # parse all transactions from transactionarray in xml
for each in tArray: # tArray is every transaction, in transactionarray)
print each.shippedtime # print shipped time, if None then hasn't been shipped.
次のような出力が必要です。
<shippedtime>2016-12-18T15:12:22.000Z</shippedtime>
<shippedtime>2016-12-20T00:35:43.000Z</shippedtime>
<shippedtime>2016-12-20T01:50:37.000Z</shippedtime>
None
この情報を使用して、try/except
各トランザクションをループできます。If shippedtime == None
、次に、注文を分析して、などの有用な情報を取得できprint each.shippingaddress, each.orderlineitemid, each.paidtime
ます...