本文整理汇总了Python中PixivModel.PixivTags.parseMemberTags方法的典型用法代码示例。如果您正苦于以下问题:Python PixivTags.parseMemberTags方法的具体用法?Python PixivTags.parseMemberTags怎么用?Python PixivTags.parseMemberTags使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PixivModel.PixivTags
的用法示例。
在下文中一共展示了PixivTags.parseMemberTags方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: testTagsMemberSearchLast
# 需要导入模块: from PixivModel import PixivTags [as 别名]
# 或者: from PixivModel.PixivTags import parseMemberTags [as 别名]
def testTagsMemberSearchLast(self):
path = './test/test-tags-member-search-last.htm'
p = open(path, 'r')
page = BeautifulSoup(p.read())
image = PixivTags()
image.parseMemberTags(page, 313631)
# self.assertEqual(len(image.itemList), 10)
self.assertEqual(image.itemList[-1].imageId, 1804545)
self.assertEqual(image.isLastPage, True)
示例2: testTagsMemberSearchLast
# 需要导入模块: from PixivModel import PixivTags [as 别名]
# 或者: from PixivModel.PixivTags import parseMemberTags [as 别名]
def testTagsMemberSearchLast(self):
br = Browser()
path = 'file:///' + os.path.abspath('./test/test-tags-member-search-last.htm').replace(os.sep,'/')
p = br.open(path, 'r')
page = BeautifulSoup(p.read())
image = PixivTags()
image.parseMemberTags(page)
##self.assertEqual(len(image.itemList), 10)
self.assertEqual(image.itemList[-1].imageId, 1804545)
self.assertEqual(image.isLastPage, True)
示例3: testTagsMemberSearch
# 需要导入模块: from PixivModel import PixivTags [as 别名]
# 或者: from PixivModel.PixivTags import parseMemberTags [as 别名]
def testTagsMemberSearch(self):
br = Browser()
path = 'file:///' + os.path.abspath('./test/test-tags-member-search.htm').replace(os.sep,'/')
p = br.open(path, 'r')
page = BeautifulSoup(p.read())
image = PixivTags()
image.parseMemberTags(page)
self.assertEqual(len(image.itemList), 20)
self.assertEqual(image.itemList[0].imageId, 25757869)
self.assertEqual(image.itemList[19].imageId, 14818847)
self.assertEqual(image.isLastPage, False)
示例4: testTagsMemberSearch
# 需要导入模块: from PixivModel import PixivTags [as 别名]
# 或者: from PixivModel.PixivTags import parseMemberTags [as 别名]
def testTagsMemberSearch(self):
path = './test/test-tags-member-search.htm'
p = open(path, 'r')
page = BeautifulSoup(p.read())
image = PixivTags()
image.parseMemberTags(page, 313631)
self.assertEqual(len(image.itemList), 40)
# self.assertEqual(image.itemList[0].imageId, 53977340)
# self.assertEqual(image.itemList[19].imageId, 45511597)
self.assertEqual(image.isLastPage, False)
self.assertEqual(image.availableImages, 73)
示例5: testTagsMemberSearch
# 需要导入模块: from PixivModel import PixivTags [as 别名]
# 或者: from PixivModel.PixivTags import parseMemberTags [as 别名]
def testTagsMemberSearch(self):
br = Browser()
path = 'file:///' + os.path.abspath('./test/test-tags-member-search.htm').replace(os.sep, '/')
p = br.open(path, 'r')
page = BeautifulSoup(p.read())
image = PixivTags()
image.parseMemberTags(page, 313631)
self.assertEqual(len(image.itemList), 40)
# self.assertEqual(image.itemList[0].imageId, 53977340)
# self.assertEqual(image.itemList[19].imageId, 45511597)
self.assertEqual(image.isLastPage, False)
self.assertEqual(image.availableImages, 66)