本文整理汇总了Python中listing.Listing.country方法的典型用法代码示例。如果您正苦于以下问题:Python Listing.country方法的具体用法?Python Listing.country怎么用?Python Listing.country使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类listing.Listing
的用法示例。
在下文中一共展示了Listing.country方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: collect_page_results
# 需要导入模块: from listing import Listing [as 别名]
# 或者: from listing.Listing import country [as 别名]
def collect_page_results(self, store):
names = self.driver.find_elements_by_xpath('//a[@name="listpage_productname"]')
model_numbers = self.driver.find_elements_by_xpath('//ul[@class="productInfo"]/li[@class="last"]')
item_numbers = self.driver.find_elements_by_xpath('//ul[@class="productInfo"]/li[not(@class="last")]')
prices = self.driver.find_elements_by_xpath('//p[@class="pricing"]/strong')
self.load_next_check = model_numbers[0].text[9:]
page_results = []
for i in range(0, len(names)):
listing = Listing()
listing.name = names[i].text
listing.item_number = item_numbers[i].text[8:]
listing.model_number = model_numbers[i].text[9:]
listing.price = prices[i].text[1:]
listing.country = store.country
listing.state = store.state
listing.town = store.town
listing.store_number = store.store_number
listing.address = store.address
page_results.append(listing)
return page_results