Esempio n. 1
0
def findCards(soup):
	# All cards in the list
	cards = soup.find("form", attrs={"name": "filterForm"}).findNextSibling("table").find("th", "col_price").parent.parent.findAll("tr", {"class": ["odd", "even"]})
	for card in cards:
		name = card.findAll("td")[2].a.string
		price = card.findAll("td")[6].string.replace(" €", "").replace(",", ".")
		# Check if the card should be allowed (non basic land / token)
		if store.filter_card(name):
			# Add the card to the store
			store.add_card(name, "", "")
			store.add_price(name, "Innistrad", "MagicCardMarket", price)
		else:
			print("Ignoring %s" % name)
Esempio n. 2
0
def findCards(soup):
	# All cards in the list
	cards = soup.findAll("form")[1].findAll("table")[1].findAll("tr")
	for card in cards:
		name = card.findAll("td")[0].a.string
		price = card.findAll("td")[4].a.string[1:]
		
		# Check if the card should be allowed (non basic land / token)
		if store.filter_card(name):
			# Add the card to the store
			store.add_card(name, "", "")
			store.add_price(name, "Innistrad", "TCGPlayer", price)
		else:
			print("Ignoring %s" % name)
Esempio n. 3
0
def findCards(soup):
	# All cards in the list
	cards = soup.findAll("tr", {"class": ["product-listing-odd1", "product-listing-even1"]})
	for card in cards:
		name = card.findAll("td")[1].a.string
		price = card.findAll("td")[5].string.replace("€ ", "").replace(",", ".")
		
		# Check if the card should be allowed (non basic land / token)
		if store.filter_card(name):
			# Add the card to the store
			store.add_card(name, "", "")
			store.add_price(name, "Innistrad", "BazaarOfMagic", price)
		else:
			print("Ignoring %s" % name)
Esempio n. 4
0
def findCards(soup):
	# All cards in the list
	cards = soup.findAll("tr", "searchrow")
	for card in cards:
		name = card.find("a", "kaartnaam").string.replace("’", "'")
		price = card.findAll("td")[2].b.string.replace("€ ", "").replace(",", ".")

		# Check if the card should be allowed (non basic land / token)
		if store.filter_card(name):
			# Add the card to the store
			store.add_card(name, "", "")
			store.add_price(name, "Innistrad", "Nedermagic", price)
		else:
			print("Ignoring %s" % name)
Esempio n. 5
0
def findCards(soup):
	# All cards in the list
	cards = soup.findAll("div", "list_option")
	for card in cards:
		name = card.find("span", "shadow").string
		price = card.find("div", "list_price_right_middle").text.replace("€", "").replace(",", ".")
		
		# Check if the card should be allowed (non basic land / token)
		if store.filter_card(name):
			# Add the card to the store
			store.add_card(name, "", "")
			store.add_price(name, "Innistrad", "Magicers", price)
		else:
			print("Ignoring %s" % name)
Esempio n. 6
0
def findCards(soup):
	# All cards in the list
	cards = soup.findAll("tr", {"class": ["productListing-odd", "productListing-even"]})
	for card in cards:
		# Remove the double faced card names
		name = re.sub(r"/.*$", "", card.findAll("td")[2].h3.a.string).strip()
		price = card.findAll("td")[5].text.replace("EUR... more info", "")
		
		# Check if the card should be allowed (non basic land / token)
		if store.filter_card(name):
			# Add the card to the store
			store.add_card(name, "", "")
			store.add_price(name, "Innistrad", "DragonBreath", price)
		else:
			print("Ignoring %s" % name)
Esempio n. 7
0
def findCards(soup):
	# All cards in the list
	cards = soup.find("div", id="content-binnen").tbody.findAll("tr")
	for card in cards:
		temp = re.sub(r"/.*$", "", card.findAll("td")[0].find("a", text=True)).strip()
		name = re.sub(r".\(M\)", "", temp).strip()
		
		price = card.findAll("td")[3].string[2:].replace(",", ".")
		# Check if the card should be allowed (non basic land / token)
		if store.filter_card(name):
			# Add the card to the store
			store.add_card(name, "", "")
			store.add_price(name, "Innistrad", "MagicUnited", price)
		else:
			print("Ignoring %s" % name)
Esempio n. 8
0
def findCards(soup):
	# All cards in the list
	cards = soup.findAll("tr", {"class": ["deckdbbody", "deckdbbody2"]})
	for card in cards:
		field = card.findAll("td")[0].find("a")
		if field is not None:
			temp = re.compile("\"[.]*>(.*)", re.DOTALL).findall(field.text)[0].strip()
			name = re.sub(r"\|.*$", "", temp).strip()
			price = card.findAll(text=re.compile("\$(.*)", re.DOTALL))
			if len(price) > 0:
				# Check if the card should be allowed (non basic land / token)
				if store.filter_card(name):
					# Add the card to the store
					store.add_card(name, "", "")
					store.add_price(name, "Innistrad", "StarCityGames", price[0][1:])
				else:
					print("Ignoring %s" % name)
Esempio n. 9
0
def findCards(soup):
	# All cards in the list
	products = soup.findAll("tr", {"class": ["product_row even", "product_row odd"]})
	for product in products:
		#image = product.find("a", "thumbnail")["href"]
		card = product.findAll("td")[1]
		
		# Remove the double faced card names
		name = re.sub(r"/.*$", "", card.a.string).strip()
		price = card.find("td", "price", recursive=True).string.strip()[1:]
		
		# Check if the card should be allowed (non basic land / token)
		if store.filter_card(name):
			# Add the card to the store
			store.add_card(name, "", "")
			store.add_price(name, "Innistrad", "ChannelFireball", price)
		else:
			print("Ignoring %s" % name)