Exemplo n.º 1
0
    def _getTotalArtCount(self, artist):
        basePage = "http://www.pixiv.net/member_illust.php?id=%s" % artist
        page = self.wg.getSoup(basePage)

        mainDiv = page.find("div", class_="layout-a")
        if not mainDiv:
            raise exceptions.AccountDisabledException(
                "Could not retreive artist item quantity!")
        countSpan = mainDiv.find("span", class_="count-badge")
        if not countSpan:
            raise exceptions.AccountDisabledException(
                "Could not retreive artist item quantity!")

        text = countSpan.text.split()[0]
        text = ''.join([char for char in text if char in '0123456789'])
        return int(text)
Exemplo n.º 2
0
	def _getTotalArtCount(self, artist):

		basePage = 'https://inkbunny.net/{user}'.format(user=artist)

		page = self.wg.getSoup(basePage)
		stats = page.find('span', class_='stat', title='Submissions Uploaded')
		if stats and stats.strong:
			return int(stats.strong.get_text().replace(",", ""))

		raise exceptions.AccountDisabledException("Could not retreive artist item quantity!")
Exemplo n.º 3
0
    def _getTotalArtCount(self, artist):
        basePage = "http://www.hentai-foundry.com/user/%s/profile" % artist
        page = self.wg.getSoup(basePage)

        tds = page.find("b", text="# Pictures")

        stats = tds.parent.parent.find("td", text=re.compile(r"^\d+$"))
        if stats:
            return int(stats.text)

        raise exceptions.AccountDisabledException(
            "Could not retreive artist item quantity!")
Exemplo n.º 4
0
	def _getTotalArtCount(self, artist):
		basePage = "http://www.furaffinity.net/user/%s/" % artist
		page = self.wg.getSoup(basePage)
		pgstr = str(page)
		if 'has voluntarily disabled access to their account and all of its contents.' in pgstr:
			self.log.warning("Disabled account!")
			return 0
		if 'This user cannot be found.' in pgstr:
			self.log.warning("Account not found!")
			raise exceptions.AccountDisabledException("Could not retreive artist item quantity!")

		tds = page.find("td", align="right", text="Statistics")

		stats = tds.parent.parent.text
		for line in stats.splitlines():
			line = line.rstrip(" 	").lstrip(" 	")
			if "Submissions: " in line:

				num = line.split(":")[-1]
				return int(num)

		raise exceptions.AccountDisabledException("Could not retreive artist item quantity!")
Exemplo n.º 5
0
	def _getTotalArtCount(self, artist):
		# Apparently users can turn this off? F*****g annoying.

		basePage = "https://www.weasyl.com/~{user}".format(user=artist)

		page = self.wg.getSoup(basePage)
		stats = page.find('div', id='user-stats')
		if not stats:
			return None

		item = stats.find("dd", text='Submissions')
		if not item:
			return None

		if item:
			# This feels a bit brittle, but I can't see how else to get the row
			# I want.
			items = item.previous_sibling.previous_sibling.get_text()
			return int(items)

		raise exceptions.AccountDisabledException("Could not retreive artist item quantity!")