Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(27)  |  Call(24)  |  Derive(0)  |  Import(3)

src/p/i/PixivUtil2-HEAD/PixivUtil2.py   PixivUtil2(Download)
import PixivDBManager
import PixivHelper
from PixivModel import PixivArtist, PixivImage, PixivListItem, PixivBookmark, PixivTags
from PixivModel import PixivNewIllustBookmark, PixivGroup
from PixivException import PixivException
                medium_page = __br__.open('http://www.pixiv.net/member_illust.php?mode=medium&illust_id=' + str(image_id))
                parse_medium_page = BeautifulSoup(medium_page.read())
                image = PixivImage(iid=image_id, page=parse_medium_page, parent=artist, fromBookmark=bookmark, bookmark_count=bookmark_count)
                # dump medium page
                if __config__.dumpMediumPage :

src/p/i/PixivUtil2-HEAD/PixivHelper.py   PixivUtil2(Download)
        filenameFormat = os.sep + filenameFormat
    filenameFormat = filenameFormat.split(os.sep)[0]
    image = PixivModel.PixivImage(parent=artistPage)
    filename = makeFilename(filenameFormat, image, tagsSeparator=tagsSeparator, tagsLimit=tagsLimit,
                            fileUrl=artistPage.artistAvatar, appendExtension=False)

src/p/i/PixivUtil2-HEAD/test.PixivModel.py   PixivUtil2(Download)
#!/c/Python27/python.exe
# -*- coding: UTF-8 -*-
from PixivModel import PixivArtist, PixivImage, PixivBookmark,PixivNewIllustBookmark, PixivTags, PixivGroup
from PixivException import PixivException
from BeautifulSoup import BeautifulSoup
    def testPixivImageParseInfo(self):
      p = open('./test/test-image-info.html', 'r')
      page = BeautifulSoup(p.read())
      image2 = PixivImage(32039274, page)
      page.decompose()
    def testPixivImageParseInfoJa(self):
      p = open('./test/test-image-parse-image-40273739-ja.html', 'r')
      page = BeautifulSoup(p.read())
      image2 = PixivImage(40273739, page)
      page.decompose()
    def testPixivImageParseInfoPixivPremiumOffer(self):
      p = open('./test/test-image-parse-image-38826533-pixiv-premium.html', 'r')
      page = BeautifulSoup(p.read())
      image2 = PixivImage(38826533, page)
      page.decompose()
    def testPixivImageNoAvatar(self):
      #print '\nTesting artist page without avatar image'
      p = open('./test/test-image-noavatar.htm', 'r')
      page = BeautifulSoup(p.read())
      image = PixivImage(20496355, page)

src/p/i/PixivUtil2-HEAD/test.PixivHelper.py   PixivUtil2(Download)
import os
import unittest
from PixivModel import PixivImage, PixivArtist
from BeautifulSoup import BeautifulSoup
 
  def testCreateMangaFilename(self):
    p = open('./test/test-image-manga.htm', 'r')
    page = BeautifulSoup(p.read())
    imageInfo = PixivImage(28820443, page)
    imageInfo.imageCount = 100
  def testCreateFilenameUnicode(self):
    p = open('./test/test-image-unicode.htm', 'r')
    page = BeautifulSoup(p.read())
    imageInfo = PixivImage(2493913, page)
    page.decompose()