buscador

Simple Python Fetcher
Baixe Agora

buscador Classificação e resumo

Propaganda

  • Rating:
  • Licença:
  • BSD License
  • Nome do editor:
  • Mutang

buscador Tag


buscador Descrição

Simple Python Fetcher Fetcher é um simples módulo python fetcher.specífico, consulte o caso de teste: #! / usr / bin / bin Python # codificando: UTF-8From Fetcher Import * da Unittest Import TestcaseImport Loggingdef test_fetcher_fetch (): Fetcher () d = fetcher .fetch ("http://www.163.com") Assert D.code == 200Def test_fetcher_head (): fetcher = fetcher () d = fetcher.head ("http://www.163.com") .info (d) Assert "Content-Type" em D Def Test_Charset (): Fetcher = Fetcher () d = fetcher.fetch ("http://www.taobao.com") Assert "GB2312" == Fetcherutil.Charset (D.Content) Def Test_Decode (): Fetcher = Fetcher () d = fetcher.fetch ("http://www.taobao.com") Assert "· " não em d.content c = fetcherutil. Decode (D.Content, "UTF-8") Assert "· ·" no CDEF Test_image_fetcher (): fetcher = imagefetcher () images = fetcher.fetch ("http://www.taobao.com") Assert imagens requisitos: · Pitão


buscador Software Relacionado