当前位置: 首页>>代码示例>>Python>>正文


Python PixivModel.PixivTags类代码示例

本文整理汇总了Python中PixivModel.PixivTags的典型用法代码示例。如果您正苦于以下问题:Python PixivTags类的具体用法?Python PixivTags怎么用?Python PixivTags使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了PixivTags类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: testTagsSkipShowcase

    def testTagsSkipShowcase(self):
        path = './test/test-tags-search-skip-showcase.htm'
        p = open(path, 'r')
        page = BeautifulSoup(p.read())
        image = PixivTags()
        image.parseTags(page)

        self.assertEqual(len(image.itemList), 40)
开发者ID:Nandaka,项目名称:PixivUtil2,代码行数:8,代码来源:test_PixivModel.py

示例2: testTagsSearchPartialLast

    def testTagsSearchPartialLast(self):
        path = './test/test-tags-search-partial-last.htm'
        p = open(path, 'r')
        page = BeautifulSoup(p.read())
        image = PixivTags()
        image.parseTags(page)

        self.assertEqual(image.itemList[-1].imageId, 15060554)
        self.assertEqual(image.isLastPage, True)
开发者ID:Nandaka,项目名称:PixivUtil2,代码行数:9,代码来源:test_PixivModel.py

示例3: testTagsSearchPartial

    def testTagsSearchPartial(self):
        path = './test/test-tags-search-partial.htm'
        p = open(path, 'r')
        page = BeautifulSoup(p.read())
        image = PixivTags()
        image.parseTags(page)

        self.assertEqual(len(image.itemList), 40)
        self.assertEqual(image.isLastPage, False)
开发者ID:Nandaka,项目名称:PixivUtil2,代码行数:9,代码来源:test_PixivModel.py

示例4: testTagsSkipShowcase

    def testTagsSkipShowcase(self):
        br = Browser()
        path = 'file:///' + os.path.abspath('./test/test-tags-search-skip-showcase.htm').replace(os.sep,'/')
        p = br.open(path, 'r')
        page = BeautifulSoup(p.read())
        image = PixivTags()
        image.parseTags(page)

        self.assertEqual(len(image.itemList), 20)
开发者ID:EvilNeo,项目名称:PixivUtil2,代码行数:9,代码来源:test.PixivModel.py

示例5: testTagsSearchExactLast

    def testTagsSearchExactLast(self):
        path = './test/test-tags-search-exact-last.htm'
        p = open(path, 'r')
        page = BeautifulSoup(p.read())
        image = PixivTags()
        image.parseTags(page)

        print(image.itemList[-1])
        self.assertEqual(image.itemList[-1].imageId, 544700)
        self.assertEqual(image.isLastPage, True)
开发者ID:Nandaka,项目名称:PixivUtil2,代码行数:10,代码来源:test_PixivModel.py

示例6: testTagsSearchExact

    def testTagsSearchExact(self):
        path = './test/test-tags-search-exact.htm'
        p = open(path, 'r')
        page = BeautifulSoup(p.read())
        image = PixivTags()
        image.parseTags(page)
##        for img in image.itemList:
##            print(img.imageId)
        self.assertEqual(len(image.itemList), 40)
        self.assertEqual(image.isLastPage, False)
开发者ID:Nandaka,项目名称:PixivUtil2,代码行数:10,代码来源:test_PixivModel.py

示例7: testTagsSearchExact1

    def testTagsSearchExact1(self):
        path = './test/test-tags-search-exact2.htm'
        p = open(path, 'r')
        page = BeautifulSoup(p.read())
        image = PixivTags()
        image.parseTags(page)

        self.assertEqual(len(image.itemList), 40)
        self.assertEqual(image.isLastPage, False)
        self.assertEqual(image.availableImages, 2283)
开发者ID:Nandaka,项目名称:PixivUtil2,代码行数:10,代码来源:test_PixivModel.py

示例8: testTagsSearchExact

    def testTagsSearchExact(self):
        br = Browser()
        path = "file:///" + os.path.abspath("./test/test-tags-search-exact.htm").replace(os.sep, "/")
        p = br.open(path, "r")
        page = BeautifulSoup(p.read())
        image = PixivTags()
        image.parseTags(page)

        self.assertEqual(len(image.itemList), 20)
        self.assertEqual(image.isLastPage, False)
开发者ID:yife,项目名称:PixivUtil2,代码行数:10,代码来源:test.PixivModel.py

示例9: testTagsSearchPartial

    def testTagsSearchPartial(self):
        br = Browser()
        path = 'file:///' + os.path.abspath('./test/test-tags-search-partial.htm').replace(os.sep,'/')
        p = br.open(path, 'r')
        page = BeautifulSoup(p.read())
        image = PixivTags()
        image.parseTags(page)

        self.assertEqual(len(image.itemList), 20)
        self.assertEqual(image.isLastPage, False)
开发者ID:EvilNeo,项目名称:PixivUtil2,代码行数:10,代码来源:test.PixivModel.py

示例10: testTagsSearchPartialLast

    def testTagsSearchPartialLast(self):
        br = Browser()
        path = 'file:///' + os.path.abspath('./test/test-tags-search-partial-last.htm').replace(os.sep,'/')
        p = br.open(path, 'r')
        page = BeautifulSoup(p.read())
        image = PixivTags()
        image.parseTags(page)

        self.assertEqual(image.itemList[-1].imageId, 15060554)
        self.assertEqual(image.isLastPage, True)
开发者ID:EvilNeo,项目名称:PixivUtil2,代码行数:10,代码来源:test.PixivModel.py

示例11: testTagsMemberSearchLast

    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)
开发者ID:Phenrei,项目名称:PixivUtil2,代码行数:10,代码来源:test.PixivModel.py

示例12: testTagsMemberSearchLast

    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)
开发者ID:EvilNeo,项目名称:PixivUtil2,代码行数:11,代码来源:test.PixivModel.py

示例13: testTagsSearchParseDetails

    def testTagsSearchParseDetails(self):
        path = './test/test-tags-search-exact-parse_details.htm'
        p = open(path, 'r')
        page = BeautifulSoup(p.read())
        image = PixivTags()
        image.parseTags(page)

        # self.assertEqual(len(image.itemList), 20)
        self.assertEqual(image.itemList[-1].imageId, 33815932)
        self.assertGreater(image.itemList[-1].bookmarkCount, 4)
        self.assertEqual(image.itemList[-1].imageResponse, 0)
开发者ID:Nandaka,项目名称:PixivUtil2,代码行数:11,代码来源:test_PixivModel.py

示例14: testTagsMemberSearch

    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)
开发者ID:Phenrei,项目名称:PixivUtil2,代码行数:12,代码来源:test.PixivModel.py

示例15: testTagsSearchParseDetails

    def testTagsSearchParseDetails(self):
        br = Browser()
        path = 'file:///' + os.path.abspath('./test/test-tags-search-exact-parse_details.htm').replace(os.sep,'/')
        p = br.open(path, 'r')
        page = BeautifulSoup(p.read())
        image = PixivTags()
        image.parseTags(page)

        ##self.assertEqual(len(image.itemList), 20)
        self.assertEqual(image.itemList[-1].imageId, 33815932)
        self.assertEqual(image.itemList[-1].bookmarkCount, 4)
        self.assertEqual(image.itemList[-1].imageResponse, 0)
开发者ID:EvilNeo,项目名称:PixivUtil2,代码行数:12,代码来源:test.PixivModel.py


注:本文中的PixivModel.PixivTags类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。