为所有NHL团队刮去徽标

nhl-logo-scraper的Python项目详细描述


https://badge.fury.io/py/nhl-logo-scraper.svghttps://codecov.io/gh/blindman/nhl-logo-scraper/branch/master/graph/badge.svghttps://travis-ci.org/blindman/nhl-logo-scraper.svg?branch=master

为所有nhl团队、联盟和网络刮取徽标

Usage

首先克隆项目。

$ git clone https://github.com/blindman/nhl-logo-scraper.git

克隆项目后,运行以下命令以使实用程序在终端中工作。

$ pip install .
$ nhlscraper --help

刮擦

$ nhlscraper scrape [--output=DIR] [--format EXTENSIONS] [--archive]
--output=DIRThe directory to dump all of the files [default: ./output]
--format EXTENSIONS
Image output formats (svg and/or png) [default: svg]
--archiveArchive any previous logos that were downloaded [default: True]
--debugAllow debugging logs through

清洁

$ nhlscraper clean [--dir=DIR] [--category CATEGORIES] [--full]
--dir=DIRThe directory that the files live in [default: ./output]
--category CATEGORIES
Categories to remove all files (league, network, team)
--fullClean all files created by this tool (includes archives)
--debugAllow debugging logs through

其他

$ nhlscraper -h | --help
$ nhlscraper --version

Contributing

假设已经克隆了项目并创建了virtualenv,请运行以下命令来处理代码。

$ virtualenv –python python3 venv $ source venv/bin/activate $ pip install -e .[test]

要测试代码,请运行以下命令。

$ python setup.py test

Notes

这是我以前的imageDownloader存储库的一个分支,它做了相同的事情,但作为bash脚本,并且用于nhl.com的前一个版本

您可能已经注意到,nhl.com被请求并解析为查找::code`nhl logos.css',而不是直接检索css文件。这是因为(我相信)该文件的路径可能会更改。当前路径是::code::../builds/../f0683b50089da6c16c1df297a9a74ce08e79b94b_1507226889/../nhl logos.css,由于中间的大块看起来像一个唯一的标识符,因此我假设它会更改。我希望实现某种缓存,这样它就不会每次都发出请求。

License

麻省理工学院[jon heller](https://github.com/blindman

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java为什么我不能从ObjectInputStream读取ArrayList?   linux如何设置java时区?   java是一种拥有系统的方法。出来在循环中打印不同的内容?   scala Apache Spark:在Java中有效地使用mapPartitions   java Maven对com的依赖性。白天利用率   java将多个数据映射到单个id的表的正式名称是什么?   java如何在Android应用程序中隐藏FulterWave API键   SeleniumWebDriverJava:如何使用行号和列号单击表中的特定单元格   java Springbatch将数据从写入程序或处理器传递到RestConroller   java在Android TextView中一次换行两行,并带有跨距   java如何使这个rxjava zip并行运行?   JAVAutil。登录中。记录器不尊重java。util。登录中。数量   java无法将参数发布到服务器   java Eclipse:在自定义透视图/视图的状态行上显示作业进度   java在调用findAll()时,找到了多个具有给定标识符的行,但如果我使用findById()遍历所有条目,则可以工作;   Java中的正则表达式问题   Java中的实例变量   java如何在安卓中逐字搜索   java如何计算百分比