├── .gitignore ├── .travis.yml ├── Cargo.lock ├── Cargo.toml ├── LICENSE ├── README.md ├── src ├── lib.rs └── main.rs └── tests └── lib.rs /.gitignore: -------------------------------------------------------------------------------- 1 | target 2 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: rust 2 | rust: 3 | - stable 4 | - beta 5 | - nightly 6 | matrix: 7 | allow_failures: 8 | - rust: nightly 9 | -------------------------------------------------------------------------------- /Cargo.lock: -------------------------------------------------------------------------------- 1 | [[package]] 2 | name = "adler32" 3 | version = "1.0.2" 4 | source = "registry+https://github.com/rust-lang/crates.io-index" 5 | 6 | [[package]] 7 | name = "aho-corasick" 8 | version = "0.6.3" 9 | source = "registry+https://github.com/rust-lang/crates.io-index" 10 | dependencies = [ 11 | "memchr 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", 12 | ] 13 | 14 | [[package]] 15 | name = "ansi_term" 16 | version = "0.9.0" 17 | source = "registry+https://github.com/rust-lang/crates.io-index" 18 | 19 | [[package]] 20 | name = "antidote" 21 | version = "1.0.0" 22 | source = "registry+https://github.com/rust-lang/crates.io-index" 23 | 24 | [[package]] 25 | name = "arrayvec" 26 | version = "0.4.7" 27 | source = "registry+https://github.com/rust-lang/crates.io-index" 28 | dependencies = [ 29 | "nodrop 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", 30 | ] 31 | 32 | [[package]] 33 | name = "atty" 34 | version = "0.2.2" 35 | source = "registry+https://github.com/rust-lang/crates.io-index" 36 | dependencies = [ 37 | "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", 38 | "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)", 39 | "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", 40 | ] 41 | 42 | [[package]] 43 | name = "base64" 44 | version = "0.9.1" 45 | source = "registry+https://github.com/rust-lang/crates.io-index" 46 | dependencies = [ 47 | "byteorder 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)", 48 | "safemem 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 49 | ] 50 | 51 | [[package]] 52 | name = "bitflags" 53 | version = "0.8.2" 54 | source = "registry+https://github.com/rust-lang/crates.io-index" 55 | 56 | [[package]] 57 | name = "bitflags" 58 | version = "0.9.1" 59 | source = "registry+https://github.com/rust-lang/crates.io-index" 60 | 61 | [[package]] 62 | name = "bitflags" 63 | version = "1.0.2" 64 | source = "registry+https://github.com/rust-lang/crates.io-index" 65 | 66 | [[package]] 67 | name = "build_const" 68 | version = "0.2.1" 69 | source = "registry+https://github.com/rust-lang/crates.io-index" 70 | 71 | [[package]] 72 | name = "byteorder" 73 | version = "1.2.2" 74 | source = "registry+https://github.com/rust-lang/crates.io-index" 75 | 76 | [[package]] 77 | name = "bytes" 78 | version = "0.4.6" 79 | source = "registry+https://github.com/rust-lang/crates.io-index" 80 | dependencies = [ 81 | "byteorder 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)", 82 | "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", 83 | ] 84 | 85 | [[package]] 86 | name = "cc" 87 | version = "1.0.10" 88 | source = "registry+https://github.com/rust-lang/crates.io-index" 89 | 90 | [[package]] 91 | name = "cfg-if" 92 | version = "0.1.2" 93 | source = "registry+https://github.com/rust-lang/crates.io-index" 94 | 95 | [[package]] 96 | name = "clap" 97 | version = "2.23.2" 98 | source = "registry+https://github.com/rust-lang/crates.io-index" 99 | dependencies = [ 100 | "ansi_term 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", 101 | "atty 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", 102 | "bitflags 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", 103 | "strsim 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", 104 | "term_size 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", 105 | "unicode-segmentation 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", 106 | "unicode-width 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", 107 | "vec_map 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", 108 | ] 109 | 110 | [[package]] 111 | name = "core-foundation" 112 | version = "0.2.3" 113 | source = "registry+https://github.com/rust-lang/crates.io-index" 114 | dependencies = [ 115 | "core-foundation-sys 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", 116 | "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)", 117 | ] 118 | 119 | [[package]] 120 | name = "core-foundation-sys" 121 | version = "0.2.3" 122 | source = "registry+https://github.com/rust-lang/crates.io-index" 123 | dependencies = [ 124 | "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)", 125 | ] 126 | 127 | [[package]] 128 | name = "crc" 129 | version = "1.8.1" 130 | source = "registry+https://github.com/rust-lang/crates.io-index" 131 | dependencies = [ 132 | "build_const 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 133 | ] 134 | 135 | [[package]] 136 | name = "crossbeam-deque" 137 | version = "0.3.0" 138 | source = "registry+https://github.com/rust-lang/crates.io-index" 139 | dependencies = [ 140 | "crossbeam-epoch 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", 141 | "crossbeam-utils 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", 142 | ] 143 | 144 | [[package]] 145 | name = "crossbeam-epoch" 146 | version = "0.4.1" 147 | source = "registry+https://github.com/rust-lang/crates.io-index" 148 | dependencies = [ 149 | "arrayvec 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)", 150 | "cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", 151 | "crossbeam-utils 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", 152 | "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", 153 | "memoffset 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 154 | "scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", 155 | ] 156 | 157 | [[package]] 158 | name = "crossbeam-utils" 159 | version = "0.2.2" 160 | source = "registry+https://github.com/rust-lang/crates.io-index" 161 | dependencies = [ 162 | "cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", 163 | ] 164 | 165 | [[package]] 166 | name = "crossbeam-utils" 167 | version = "0.3.2" 168 | source = "registry+https://github.com/rust-lang/crates.io-index" 169 | dependencies = [ 170 | "cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", 171 | ] 172 | 173 | [[package]] 174 | name = "dtoa" 175 | version = "0.4.1" 176 | source = "registry+https://github.com/rust-lang/crates.io-index" 177 | 178 | [[package]] 179 | name = "encoding_rs" 180 | version = "0.7.2" 181 | source = "registry+https://github.com/rust-lang/crates.io-index" 182 | dependencies = [ 183 | "cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", 184 | ] 185 | 186 | [[package]] 187 | name = "foreign-types" 188 | version = "0.3.2" 189 | source = "registry+https://github.com/rust-lang/crates.io-index" 190 | dependencies = [ 191 | "foreign-types-shared 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", 192 | ] 193 | 194 | [[package]] 195 | name = "foreign-types-shared" 196 | version = "0.1.1" 197 | source = "registry+https://github.com/rust-lang/crates.io-index" 198 | 199 | [[package]] 200 | name = "fuchsia-zircon" 201 | version = "0.3.3" 202 | source = "registry+https://github.com/rust-lang/crates.io-index" 203 | dependencies = [ 204 | "bitflags 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", 205 | "fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", 206 | ] 207 | 208 | [[package]] 209 | name = "fuchsia-zircon-sys" 210 | version = "0.3.3" 211 | source = "registry+https://github.com/rust-lang/crates.io-index" 212 | 213 | [[package]] 214 | name = "futures" 215 | version = "0.1.21" 216 | source = "registry+https://github.com/rust-lang/crates.io-index" 217 | 218 | [[package]] 219 | name = "futures-cpupool" 220 | version = "0.1.8" 221 | source = "registry+https://github.com/rust-lang/crates.io-index" 222 | dependencies = [ 223 | "futures 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)", 224 | "num_cpus 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", 225 | ] 226 | 227 | [[package]] 228 | name = "httparse" 229 | version = "1.2.1" 230 | source = "registry+https://github.com/rust-lang/crates.io-index" 231 | 232 | [[package]] 233 | name = "hyper" 234 | version = "0.10.8" 235 | source = "registry+https://github.com/rust-lang/crates.io-index" 236 | dependencies = [ 237 | "httparse 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 238 | "language-tags 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", 239 | "log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", 240 | "mime 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", 241 | "num_cpus 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", 242 | "rustc-serialize 0.3.23 (registry+https://github.com/rust-lang/crates.io-index)", 243 | "rustc_version 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", 244 | "time 0.1.36 (registry+https://github.com/rust-lang/crates.io-index)", 245 | "traitobject 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", 246 | "typeable 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", 247 | "unicase 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 248 | "url 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 249 | ] 250 | 251 | [[package]] 252 | name = "hyper" 253 | version = "0.11.25" 254 | source = "registry+https://github.com/rust-lang/crates.io-index" 255 | dependencies = [ 256 | "base64 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", 257 | "bytes 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", 258 | "futures 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)", 259 | "futures-cpupool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", 260 | "httparse 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 261 | "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", 262 | "language-tags 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", 263 | "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", 264 | "mime 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", 265 | "percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", 266 | "relay 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", 267 | "time 0.1.36 (registry+https://github.com/rust-lang/crates.io-index)", 268 | "tokio-core 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", 269 | "tokio-io 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", 270 | "tokio-proto 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", 271 | "tokio-service 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", 272 | "unicase 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", 273 | ] 274 | 275 | [[package]] 276 | name = "hyper-native-tls" 277 | version = "0.2.2" 278 | source = "registry+https://github.com/rust-lang/crates.io-index" 279 | dependencies = [ 280 | "antidote 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", 281 | "hyper 0.10.8 (registry+https://github.com/rust-lang/crates.io-index)", 282 | "native-tls 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", 283 | ] 284 | 285 | [[package]] 286 | name = "hyper-tls" 287 | version = "0.1.3" 288 | source = "registry+https://github.com/rust-lang/crates.io-index" 289 | dependencies = [ 290 | "futures 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)", 291 | "hyper 0.11.25 (registry+https://github.com/rust-lang/crates.io-index)", 292 | "native-tls 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", 293 | "tokio-core 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", 294 | "tokio-io 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", 295 | "tokio-service 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", 296 | "tokio-tls 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", 297 | ] 298 | 299 | [[package]] 300 | name = "idna" 301 | version = "0.1.1" 302 | source = "registry+https://github.com/rust-lang/crates.io-index" 303 | dependencies = [ 304 | "matches 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", 305 | "unicode-bidi 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", 306 | "unicode-normalization 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", 307 | ] 308 | 309 | [[package]] 310 | name = "iovec" 311 | version = "0.1.2" 312 | source = "registry+https://github.com/rust-lang/crates.io-index" 313 | dependencies = [ 314 | "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)", 315 | "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", 316 | ] 317 | 318 | [[package]] 319 | name = "itoa" 320 | version = "0.3.1" 321 | source = "registry+https://github.com/rust-lang/crates.io-index" 322 | 323 | [[package]] 324 | name = "itoa" 325 | version = "0.4.1" 326 | source = "registry+https://github.com/rust-lang/crates.io-index" 327 | 328 | [[package]] 329 | name = "kernel32-sys" 330 | version = "0.2.2" 331 | source = "registry+https://github.com/rust-lang/crates.io-index" 332 | dependencies = [ 333 | "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", 334 | "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", 335 | ] 336 | 337 | [[package]] 338 | name = "language-tags" 339 | version = "0.2.2" 340 | source = "registry+https://github.com/rust-lang/crates.io-index" 341 | 342 | [[package]] 343 | name = "lazy_static" 344 | version = "0.2.6" 345 | source = "registry+https://github.com/rust-lang/crates.io-index" 346 | 347 | [[package]] 348 | name = "lazy_static" 349 | version = "1.0.0" 350 | source = "registry+https://github.com/rust-lang/crates.io-index" 351 | 352 | [[package]] 353 | name = "lazycell" 354 | version = "0.6.0" 355 | source = "registry+https://github.com/rust-lang/crates.io-index" 356 | 357 | [[package]] 358 | name = "libc" 359 | version = "0.2.40" 360 | source = "registry+https://github.com/rust-lang/crates.io-index" 361 | 362 | [[package]] 363 | name = "libflate" 364 | version = "0.1.14" 365 | source = "registry+https://github.com/rust-lang/crates.io-index" 366 | dependencies = [ 367 | "adler32 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", 368 | "byteorder 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)", 369 | "crc 1.8.1 (registry+https://github.com/rust-lang/crates.io-index)", 370 | ] 371 | 372 | [[package]] 373 | name = "log" 374 | version = "0.3.7" 375 | source = "registry+https://github.com/rust-lang/crates.io-index" 376 | 377 | [[package]] 378 | name = "log" 379 | version = "0.4.1" 380 | source = "registry+https://github.com/rust-lang/crates.io-index" 381 | dependencies = [ 382 | "cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", 383 | ] 384 | 385 | [[package]] 386 | name = "matches" 387 | version = "0.1.4" 388 | source = "registry+https://github.com/rust-lang/crates.io-index" 389 | 390 | [[package]] 391 | name = "memchr" 392 | version = "1.0.1" 393 | source = "registry+https://github.com/rust-lang/crates.io-index" 394 | dependencies = [ 395 | "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)", 396 | ] 397 | 398 | [[package]] 399 | name = "memoffset" 400 | version = "0.2.1" 401 | source = "registry+https://github.com/rust-lang/crates.io-index" 402 | 403 | [[package]] 404 | name = "mime" 405 | version = "0.2.3" 406 | source = "registry+https://github.com/rust-lang/crates.io-index" 407 | dependencies = [ 408 | "log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", 409 | ] 410 | 411 | [[package]] 412 | name = "mime" 413 | version = "0.3.5" 414 | source = "registry+https://github.com/rust-lang/crates.io-index" 415 | dependencies = [ 416 | "unicase 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", 417 | ] 418 | 419 | [[package]] 420 | name = "mime_guess" 421 | version = "2.0.0-alpha.4" 422 | source = "registry+https://github.com/rust-lang/crates.io-index" 423 | dependencies = [ 424 | "mime 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", 425 | "phf 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)", 426 | "phf_codegen 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)", 427 | "unicase 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 428 | ] 429 | 430 | [[package]] 431 | name = "mio" 432 | version = "0.6.14" 433 | source = "registry+https://github.com/rust-lang/crates.io-index" 434 | dependencies = [ 435 | "fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", 436 | "fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", 437 | "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", 438 | "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", 439 | "lazycell 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", 440 | "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)", 441 | "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", 442 | "miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 443 | "net2 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)", 444 | "slab 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 445 | "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", 446 | ] 447 | 448 | [[package]] 449 | name = "miow" 450 | version = "0.2.1" 451 | source = "registry+https://github.com/rust-lang/crates.io-index" 452 | dependencies = [ 453 | "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", 454 | "net2 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)", 455 | "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", 456 | "ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 457 | ] 458 | 459 | [[package]] 460 | name = "native-tls" 461 | version = "0.1.5" 462 | source = "registry+https://github.com/rust-lang/crates.io-index" 463 | dependencies = [ 464 | "lazy_static 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", 465 | "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)", 466 | "openssl 0.9.24 (registry+https://github.com/rust-lang/crates.io-index)", 467 | "schannel 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", 468 | "security-framework 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", 469 | "security-framework-sys 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", 470 | "tempdir 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", 471 | ] 472 | 473 | [[package]] 474 | name = "net2" 475 | version = "0.2.32" 476 | source = "registry+https://github.com/rust-lang/crates.io-index" 477 | dependencies = [ 478 | "cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", 479 | "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)", 480 | "winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", 481 | ] 482 | 483 | [[package]] 484 | name = "nodrop" 485 | version = "0.1.12" 486 | source = "registry+https://github.com/rust-lang/crates.io-index" 487 | 488 | [[package]] 489 | name = "num_cpus" 490 | version = "1.3.0" 491 | source = "registry+https://github.com/rust-lang/crates.io-index" 492 | dependencies = [ 493 | "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)", 494 | ] 495 | 496 | [[package]] 497 | name = "openssl" 498 | version = "0.9.24" 499 | source = "registry+https://github.com/rust-lang/crates.io-index" 500 | dependencies = [ 501 | "bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", 502 | "foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", 503 | "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", 504 | "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)", 505 | "openssl-sys 0.9.28 (registry+https://github.com/rust-lang/crates.io-index)", 506 | ] 507 | 508 | [[package]] 509 | name = "openssl-sys" 510 | version = "0.9.28" 511 | source = "registry+https://github.com/rust-lang/crates.io-index" 512 | dependencies = [ 513 | "cc 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)", 514 | "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)", 515 | "pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", 516 | "vcpkg 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", 517 | ] 518 | 519 | [[package]] 520 | name = "pbr" 521 | version = "1.0.0-alpha.3" 522 | source = "registry+https://github.com/rust-lang/crates.io-index" 523 | dependencies = [ 524 | "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", 525 | "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)", 526 | "time 0.1.36 (registry+https://github.com/rust-lang/crates.io-index)", 527 | "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", 528 | ] 529 | 530 | [[package]] 531 | name = "percent-encoding" 532 | version = "1.0.1" 533 | source = "registry+https://github.com/rust-lang/crates.io-index" 534 | 535 | [[package]] 536 | name = "phf" 537 | version = "0.7.21" 538 | source = "registry+https://github.com/rust-lang/crates.io-index" 539 | dependencies = [ 540 | "phf_shared 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)", 541 | ] 542 | 543 | [[package]] 544 | name = "phf_codegen" 545 | version = "0.7.21" 546 | source = "registry+https://github.com/rust-lang/crates.io-index" 547 | dependencies = [ 548 | "phf_generator 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)", 549 | "phf_shared 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)", 550 | ] 551 | 552 | [[package]] 553 | name = "phf_generator" 554 | version = "0.7.21" 555 | source = "registry+https://github.com/rust-lang/crates.io-index" 556 | dependencies = [ 557 | "phf_shared 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)", 558 | "rand 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", 559 | ] 560 | 561 | [[package]] 562 | name = "phf_shared" 563 | version = "0.7.21" 564 | source = "registry+https://github.com/rust-lang/crates.io-index" 565 | dependencies = [ 566 | "siphasher 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", 567 | "unicase 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 568 | ] 569 | 570 | [[package]] 571 | name = "pkg-config" 572 | version = "0.3.9" 573 | source = "registry+https://github.com/rust-lang/crates.io-index" 574 | 575 | [[package]] 576 | name = "quote" 577 | version = "0.3.15" 578 | source = "registry+https://github.com/rust-lang/crates.io-index" 579 | 580 | [[package]] 581 | name = "rand" 582 | version = "0.3.15" 583 | source = "registry+https://github.com/rust-lang/crates.io-index" 584 | dependencies = [ 585 | "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)", 586 | ] 587 | 588 | [[package]] 589 | name = "rand" 590 | version = "0.4.2" 591 | source = "registry+https://github.com/rust-lang/crates.io-index" 592 | dependencies = [ 593 | "fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", 594 | "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)", 595 | "winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", 596 | ] 597 | 598 | [[package]] 599 | name = "redox_syscall" 600 | version = "0.1.17" 601 | source = "registry+https://github.com/rust-lang/crates.io-index" 602 | 603 | [[package]] 604 | name = "regex" 605 | version = "0.2.1" 606 | source = "registry+https://github.com/rust-lang/crates.io-index" 607 | dependencies = [ 608 | "aho-corasick 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", 609 | "memchr 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", 610 | "regex-syntax 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 611 | "thread_local 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", 612 | "utf8-ranges 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", 613 | ] 614 | 615 | [[package]] 616 | name = "regex-syntax" 617 | version = "0.4.0" 618 | source = "registry+https://github.com/rust-lang/crates.io-index" 619 | 620 | [[package]] 621 | name = "relay" 622 | version = "0.1.1" 623 | source = "registry+https://github.com/rust-lang/crates.io-index" 624 | dependencies = [ 625 | "futures 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)", 626 | ] 627 | 628 | [[package]] 629 | name = "reqwest" 630 | version = "0.8.5" 631 | source = "registry+https://github.com/rust-lang/crates.io-index" 632 | dependencies = [ 633 | "bytes 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", 634 | "encoding_rs 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", 635 | "futures 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)", 636 | "hyper 0.11.25 (registry+https://github.com/rust-lang/crates.io-index)", 637 | "hyper-tls 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", 638 | "libflate 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", 639 | "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", 640 | "mime_guess 2.0.0-alpha.4 (registry+https://github.com/rust-lang/crates.io-index)", 641 | "native-tls 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", 642 | "serde 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", 643 | "serde_json 1.0.16 (registry+https://github.com/rust-lang/crates.io-index)", 644 | "serde_urlencoded 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", 645 | "tokio-core 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", 646 | "tokio-io 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", 647 | "tokio-tls 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", 648 | "url 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 649 | "uuid 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", 650 | ] 651 | 652 | [[package]] 653 | name = "rustc-serialize" 654 | version = "0.3.23" 655 | source = "registry+https://github.com/rust-lang/crates.io-index" 656 | 657 | [[package]] 658 | name = "rustc_version" 659 | version = "0.1.7" 660 | source = "registry+https://github.com/rust-lang/crates.io-index" 661 | dependencies = [ 662 | "semver 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)", 663 | ] 664 | 665 | [[package]] 666 | name = "safemem" 667 | version = "0.2.0" 668 | source = "registry+https://github.com/rust-lang/crates.io-index" 669 | 670 | [[package]] 671 | name = "schannel" 672 | version = "0.1.12" 673 | source = "registry+https://github.com/rust-lang/crates.io-index" 674 | dependencies = [ 675 | "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", 676 | "winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", 677 | ] 678 | 679 | [[package]] 680 | name = "scoped-tls" 681 | version = "0.1.1" 682 | source = "registry+https://github.com/rust-lang/crates.io-index" 683 | 684 | [[package]] 685 | name = "scopeguard" 686 | version = "0.3.3" 687 | source = "registry+https://github.com/rust-lang/crates.io-index" 688 | 689 | [[package]] 690 | name = "security-framework" 691 | version = "0.1.16" 692 | source = "registry+https://github.com/rust-lang/crates.io-index" 693 | dependencies = [ 694 | "core-foundation 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", 695 | "core-foundation-sys 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", 696 | "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)", 697 | "security-framework-sys 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", 698 | ] 699 | 700 | [[package]] 701 | name = "security-framework-sys" 702 | version = "0.1.16" 703 | source = "registry+https://github.com/rust-lang/crates.io-index" 704 | dependencies = [ 705 | "core-foundation-sys 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", 706 | "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)", 707 | ] 708 | 709 | [[package]] 710 | name = "semver" 711 | version = "0.1.20" 712 | source = "registry+https://github.com/rust-lang/crates.io-index" 713 | 714 | [[package]] 715 | name = "serde" 716 | version = "1.0.8" 717 | source = "registry+https://github.com/rust-lang/crates.io-index" 718 | 719 | [[package]] 720 | name = "serde_derive" 721 | version = "1.0.8" 722 | source = "registry+https://github.com/rust-lang/crates.io-index" 723 | dependencies = [ 724 | "quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", 725 | "serde_derive_internals 0.15.1 (registry+https://github.com/rust-lang/crates.io-index)", 726 | "syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)", 727 | ] 728 | 729 | [[package]] 730 | name = "serde_derive_internals" 731 | version = "0.15.1" 732 | source = "registry+https://github.com/rust-lang/crates.io-index" 733 | dependencies = [ 734 | "syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)", 735 | "synom 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)", 736 | ] 737 | 738 | [[package]] 739 | name = "serde_json" 740 | version = "1.0.16" 741 | source = "registry+https://github.com/rust-lang/crates.io-index" 742 | dependencies = [ 743 | "dtoa 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", 744 | "itoa 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", 745 | "serde 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", 746 | ] 747 | 748 | [[package]] 749 | name = "serde_urlencoded" 750 | version = "0.5.1" 751 | source = "registry+https://github.com/rust-lang/crates.io-index" 752 | dependencies = [ 753 | "dtoa 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", 754 | "itoa 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", 755 | "serde 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", 756 | "url 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 757 | ] 758 | 759 | [[package]] 760 | name = "siphasher" 761 | version = "0.2.2" 762 | source = "registry+https://github.com/rust-lang/crates.io-index" 763 | 764 | [[package]] 765 | name = "slab" 766 | version = "0.3.0" 767 | source = "registry+https://github.com/rust-lang/crates.io-index" 768 | 769 | [[package]] 770 | name = "slab" 771 | version = "0.4.0" 772 | source = "registry+https://github.com/rust-lang/crates.io-index" 773 | 774 | [[package]] 775 | name = "smallvec" 776 | version = "0.2.1" 777 | source = "registry+https://github.com/rust-lang/crates.io-index" 778 | 779 | [[package]] 780 | name = "stderrlog" 781 | version = "0.2.2" 782 | source = "registry+https://github.com/rust-lang/crates.io-index" 783 | dependencies = [ 784 | "log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", 785 | "time 0.1.36 (registry+https://github.com/rust-lang/crates.io-index)", 786 | ] 787 | 788 | [[package]] 789 | name = "strsim" 790 | version = "0.6.0" 791 | source = "registry+https://github.com/rust-lang/crates.io-index" 792 | 793 | [[package]] 794 | name = "syn" 795 | version = "0.11.11" 796 | source = "registry+https://github.com/rust-lang/crates.io-index" 797 | dependencies = [ 798 | "quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", 799 | "synom 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)", 800 | "unicode-xid 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)", 801 | ] 802 | 803 | [[package]] 804 | name = "synom" 805 | version = "0.11.3" 806 | source = "registry+https://github.com/rust-lang/crates.io-index" 807 | dependencies = [ 808 | "unicode-xid 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)", 809 | ] 810 | 811 | [[package]] 812 | name = "take" 813 | version = "0.1.0" 814 | source = "registry+https://github.com/rust-lang/crates.io-index" 815 | 816 | [[package]] 817 | name = "tempdir" 818 | version = "0.3.5" 819 | source = "registry+https://github.com/rust-lang/crates.io-index" 820 | dependencies = [ 821 | "rand 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", 822 | ] 823 | 824 | [[package]] 825 | name = "term_size" 826 | version = "0.3.0" 827 | source = "registry+https://github.com/rust-lang/crates.io-index" 828 | dependencies = [ 829 | "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", 830 | "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)", 831 | "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", 832 | ] 833 | 834 | [[package]] 835 | name = "thread-id" 836 | version = "3.0.0" 837 | source = "registry+https://github.com/rust-lang/crates.io-index" 838 | dependencies = [ 839 | "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", 840 | "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)", 841 | ] 842 | 843 | [[package]] 844 | name = "thread_local" 845 | version = "0.3.3" 846 | source = "registry+https://github.com/rust-lang/crates.io-index" 847 | dependencies = [ 848 | "thread-id 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)", 849 | "unreachable 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", 850 | ] 851 | 852 | [[package]] 853 | name = "time" 854 | version = "0.1.36" 855 | source = "registry+https://github.com/rust-lang/crates.io-index" 856 | dependencies = [ 857 | "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", 858 | "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)", 859 | "redox_syscall 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", 860 | "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", 861 | ] 862 | 863 | [[package]] 864 | name = "tokio" 865 | version = "0.1.5" 866 | source = "registry+https://github.com/rust-lang/crates.io-index" 867 | dependencies = [ 868 | "futures 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)", 869 | "mio 0.6.14 (registry+https://github.com/rust-lang/crates.io-index)", 870 | "tokio-executor 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", 871 | "tokio-io 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", 872 | "tokio-reactor 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", 873 | "tokio-tcp 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", 874 | "tokio-threadpool 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", 875 | "tokio-timer 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 876 | "tokio-udp 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", 877 | ] 878 | 879 | [[package]] 880 | name = "tokio-core" 881 | version = "0.1.17" 882 | source = "registry+https://github.com/rust-lang/crates.io-index" 883 | dependencies = [ 884 | "bytes 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", 885 | "futures 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)", 886 | "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", 887 | "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", 888 | "mio 0.6.14 (registry+https://github.com/rust-lang/crates.io-index)", 889 | "scoped-tls 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", 890 | "tokio 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", 891 | "tokio-executor 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", 892 | "tokio-io 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", 893 | "tokio-reactor 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", 894 | "tokio-timer 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 895 | ] 896 | 897 | [[package]] 898 | name = "tokio-executor" 899 | version = "0.1.2" 900 | source = "registry+https://github.com/rust-lang/crates.io-index" 901 | dependencies = [ 902 | "futures 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)", 903 | ] 904 | 905 | [[package]] 906 | name = "tokio-io" 907 | version = "0.1.6" 908 | source = "registry+https://github.com/rust-lang/crates.io-index" 909 | dependencies = [ 910 | "bytes 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", 911 | "futures 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)", 912 | "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", 913 | ] 914 | 915 | [[package]] 916 | name = "tokio-proto" 917 | version = "0.1.1" 918 | source = "registry+https://github.com/rust-lang/crates.io-index" 919 | dependencies = [ 920 | "futures 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)", 921 | "log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", 922 | "net2 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)", 923 | "rand 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", 924 | "slab 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", 925 | "smallvec 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 926 | "take 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", 927 | "tokio-core 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", 928 | "tokio-io 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", 929 | "tokio-service 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", 930 | ] 931 | 932 | [[package]] 933 | name = "tokio-reactor" 934 | version = "0.1.1" 935 | source = "registry+https://github.com/rust-lang/crates.io-index" 936 | dependencies = [ 937 | "futures 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)", 938 | "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", 939 | "mio 0.6.14 (registry+https://github.com/rust-lang/crates.io-index)", 940 | "slab 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 941 | "tokio-executor 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", 942 | "tokio-io 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", 943 | ] 944 | 945 | [[package]] 946 | name = "tokio-service" 947 | version = "0.1.0" 948 | source = "registry+https://github.com/rust-lang/crates.io-index" 949 | dependencies = [ 950 | "futures 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)", 951 | ] 952 | 953 | [[package]] 954 | name = "tokio-tcp" 955 | version = "0.1.0" 956 | source = "registry+https://github.com/rust-lang/crates.io-index" 957 | dependencies = [ 958 | "bytes 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", 959 | "futures 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)", 960 | "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", 961 | "mio 0.6.14 (registry+https://github.com/rust-lang/crates.io-index)", 962 | "tokio-io 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", 963 | "tokio-reactor 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", 964 | ] 965 | 966 | [[package]] 967 | name = "tokio-threadpool" 968 | version = "0.1.2" 969 | source = "registry+https://github.com/rust-lang/crates.io-index" 970 | dependencies = [ 971 | "crossbeam-deque 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", 972 | "futures 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)", 973 | "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", 974 | "num_cpus 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", 975 | "rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", 976 | "tokio-executor 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", 977 | ] 978 | 979 | [[package]] 980 | name = "tokio-timer" 981 | version = "0.2.1" 982 | source = "registry+https://github.com/rust-lang/crates.io-index" 983 | dependencies = [ 984 | "futures 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)", 985 | "tokio-executor 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", 986 | ] 987 | 988 | [[package]] 989 | name = "tokio-tls" 990 | version = "0.1.4" 991 | source = "registry+https://github.com/rust-lang/crates.io-index" 992 | dependencies = [ 993 | "futures 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)", 994 | "native-tls 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", 995 | "tokio-core 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", 996 | "tokio-io 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", 997 | ] 998 | 999 | [[package]] 1000 | name = "tokio-udp" 1001 | version = "0.1.0" 1002 | source = "registry+https://github.com/rust-lang/crates.io-index" 1003 | dependencies = [ 1004 | "bytes 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", 1005 | "futures 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)", 1006 | "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", 1007 | "mio 0.6.14 (registry+https://github.com/rust-lang/crates.io-index)", 1008 | "tokio-io 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", 1009 | "tokio-reactor 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", 1010 | ] 1011 | 1012 | [[package]] 1013 | name = "traitobject" 1014 | version = "0.1.0" 1015 | source = "registry+https://github.com/rust-lang/crates.io-index" 1016 | 1017 | [[package]] 1018 | name = "typeable" 1019 | version = "0.1.2" 1020 | source = "registry+https://github.com/rust-lang/crates.io-index" 1021 | 1022 | [[package]] 1023 | name = "unicase" 1024 | version = "1.4.0" 1025 | source = "registry+https://github.com/rust-lang/crates.io-index" 1026 | dependencies = [ 1027 | "rustc_version 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", 1028 | ] 1029 | 1030 | [[package]] 1031 | name = "unicase" 1032 | version = "2.1.0" 1033 | source = "registry+https://github.com/rust-lang/crates.io-index" 1034 | dependencies = [ 1035 | "version_check 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", 1036 | ] 1037 | 1038 | [[package]] 1039 | name = "unicode-bidi" 1040 | version = "0.2.5" 1041 | source = "registry+https://github.com/rust-lang/crates.io-index" 1042 | dependencies = [ 1043 | "matches 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", 1044 | ] 1045 | 1046 | [[package]] 1047 | name = "unicode-normalization" 1048 | version = "0.1.4" 1049 | source = "registry+https://github.com/rust-lang/crates.io-index" 1050 | 1051 | [[package]] 1052 | name = "unicode-segmentation" 1053 | version = "1.1.0" 1054 | source = "registry+https://github.com/rust-lang/crates.io-index" 1055 | 1056 | [[package]] 1057 | name = "unicode-width" 1058 | version = "0.1.4" 1059 | source = "registry+https://github.com/rust-lang/crates.io-index" 1060 | 1061 | [[package]] 1062 | name = "unicode-xid" 1063 | version = "0.0.4" 1064 | source = "registry+https://github.com/rust-lang/crates.io-index" 1065 | 1066 | [[package]] 1067 | name = "unreachable" 1068 | version = "0.1.1" 1069 | source = "registry+https://github.com/rust-lang/crates.io-index" 1070 | dependencies = [ 1071 | "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", 1072 | ] 1073 | 1074 | [[package]] 1075 | name = "url" 1076 | version = "1.4.0" 1077 | source = "registry+https://github.com/rust-lang/crates.io-index" 1078 | dependencies = [ 1079 | "idna 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", 1080 | "matches 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", 1081 | ] 1082 | 1083 | [[package]] 1084 | name = "utf8-ranges" 1085 | version = "1.0.0" 1086 | source = "registry+https://github.com/rust-lang/crates.io-index" 1087 | 1088 | [[package]] 1089 | name = "uuid" 1090 | version = "0.5.1" 1091 | source = "registry+https://github.com/rust-lang/crates.io-index" 1092 | dependencies = [ 1093 | "rand 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", 1094 | ] 1095 | 1096 | [[package]] 1097 | name = "vcpkg" 1098 | version = "0.2.3" 1099 | source = "registry+https://github.com/rust-lang/crates.io-index" 1100 | 1101 | [[package]] 1102 | name = "vec_map" 1103 | version = "0.7.0" 1104 | source = "registry+https://github.com/rust-lang/crates.io-index" 1105 | 1106 | [[package]] 1107 | name = "version_check" 1108 | version = "0.1.3" 1109 | source = "registry+https://github.com/rust-lang/crates.io-index" 1110 | 1111 | [[package]] 1112 | name = "void" 1113 | version = "1.0.2" 1114 | source = "registry+https://github.com/rust-lang/crates.io-index" 1115 | 1116 | [[package]] 1117 | name = "winapi" 1118 | version = "0.2.8" 1119 | source = "registry+https://github.com/rust-lang/crates.io-index" 1120 | 1121 | [[package]] 1122 | name = "winapi" 1123 | version = "0.3.4" 1124 | source = "registry+https://github.com/rust-lang/crates.io-index" 1125 | dependencies = [ 1126 | "winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 1127 | "winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 1128 | ] 1129 | 1130 | [[package]] 1131 | name = "winapi-build" 1132 | version = "0.1.1" 1133 | source = "registry+https://github.com/rust-lang/crates.io-index" 1134 | 1135 | [[package]] 1136 | name = "winapi-i686-pc-windows-gnu" 1137 | version = "0.4.0" 1138 | source = "registry+https://github.com/rust-lang/crates.io-index" 1139 | 1140 | [[package]] 1141 | name = "winapi-x86_64-pc-windows-gnu" 1142 | version = "0.4.0" 1143 | source = "registry+https://github.com/rust-lang/crates.io-index" 1144 | 1145 | [[package]] 1146 | name = "ws2_32-sys" 1147 | version = "0.2.1" 1148 | source = "registry+https://github.com/rust-lang/crates.io-index" 1149 | dependencies = [ 1150 | "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", 1151 | "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", 1152 | ] 1153 | 1154 | [[package]] 1155 | name = "youtube-downloader" 1156 | version = "0.1.0" 1157 | dependencies = [ 1158 | "clap 2.23.2 (registry+https://github.com/rust-lang/crates.io-index)", 1159 | "hyper 0.10.8 (registry+https://github.com/rust-lang/crates.io-index)", 1160 | "hyper-native-tls 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", 1161 | "log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", 1162 | "pbr 1.0.0-alpha.3 (registry+https://github.com/rust-lang/crates.io-index)", 1163 | "regex 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 1164 | "reqwest 0.8.5 (registry+https://github.com/rust-lang/crates.io-index)", 1165 | "serde 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", 1166 | "serde_derive 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", 1167 | "serde_urlencoded 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", 1168 | "stderrlog 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", 1169 | "url 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 1170 | ] 1171 | 1172 | [metadata] 1173 | "checksum adler32 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6cbd0b9af8587c72beadc9f72d35b9fbb070982c9e6203e46e93f10df25f8f45" 1174 | "checksum aho-corasick 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)" = "500909c4f87a9e52355b26626d890833e9e1d53ac566db76c36faa984b889699" 1175 | "checksum ansi_term 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "23ac7c30002a5accbf7e8987d0632fa6de155b7c3d39d0067317a391e00a2ef6" 1176 | "checksum antidote 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "34fde25430d87a9388dadbe6e34d7f72a462c8b43ac8d309b42b0a8505d7e2a5" 1177 | "checksum arrayvec 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)" = "a1e964f9e24d588183fcb43503abda40d288c8657dfc27311516ce2f05675aef" 1178 | "checksum atty 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d912da0db7fa85514874458ca3651fe2cddace8d0b0505571dbdcd41ab490159" 1179 | "checksum base64 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9263aa6a38da271eec5c91a83ce1e800f093c8535788d403d626d8d5c3f8f007" 1180 | "checksum bitflags 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1370e9fc2a6ae53aea8b7a5110edbd08836ed87c88736dfabccade1c2b44bff4" 1181 | "checksum bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4efd02e230a02e18f92fc2735f44597385ed02ad8f831e7c1c1156ee5e1ab3a5" 1182 | "checksum bitflags 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1b2bf7093258c32e0825b635948de528a5949799dcd61bef39534c8aab95870c" 1183 | "checksum build_const 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "39092a32794787acd8525ee150305ff051b0aa6cc2abaf193924f5ab05425f39" 1184 | "checksum byteorder 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "73b5bdfe7ee3ad0b99c9801d58807a9dbc9e09196365b0203853b99889ab3c87" 1185 | "checksum bytes 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "1b7db437d718977f6dc9b2e3fd6fc343c02ac6b899b73fdd2179163447bd9ce9" 1186 | "checksum cc 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)" = "8b9d2900f78631a5876dc5d6c9033ede027253efcd33dd36b1309fc6cab97ee0" 1187 | "checksum cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d4c819a1287eb618df47cc647173c5c4c66ba19d888a6e50d605672aed3140de" 1188 | "checksum clap 2.23.2 (registry+https://github.com/rust-lang/crates.io-index)" = "cbf1114886d7cde2d6448517161d7db8d681a9a1c09f7d210f0b0864e48195f6" 1189 | "checksum core-foundation 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "25bfd746d203017f7d5cbd31ee5d8e17f94b6521c7af77ece6c9e4b2d4b16c67" 1190 | "checksum core-foundation-sys 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "065a5d7ffdcbc8fa145d6f0746f3555025b9097a9e9cda59f7467abae670c78d" 1191 | "checksum crc 1.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d663548de7f5cca343f1e0a48d14dcfb0e9eb4e079ec58883b7251539fa10aeb" 1192 | "checksum crossbeam-deque 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c1bdc73742c36f7f35ebcda81dbb33a7e0d33757d03a06d9ddca762712ec5ea2" 1193 | "checksum crossbeam-epoch 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9b4e2817eb773f770dcb294127c011e22771899c21d18fce7dd739c0b9832e81" 1194 | "checksum crossbeam-utils 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "2760899e32a1d58d5abb31129f8fae5de75220bc2176e77ff7c627ae45c918d9" 1195 | "checksum crossbeam-utils 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d636a8b3bcc1b409d7ffd3facef8f21dcb4009626adbd0c5e6c4305c07253c7b" 1196 | "checksum dtoa 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "80c8b71fd71146990a9742fc06dcbbde19161a267e0ad4e572c35162f4578c90" 1197 | "checksum encoding_rs 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "98fd0f24d1fb71a4a6b9330c8ca04cbd4e7cc5d846b54ca74ff376bc7c9f798d" 1198 | "checksum foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" 1199 | "checksum foreign-types-shared 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" 1200 | "checksum fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" 1201 | "checksum fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" 1202 | "checksum futures 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)" = "1a70b146671de62ec8c8ed572219ca5d594d9b06c0b364d5e67b722fc559b48c" 1203 | "checksum futures-cpupool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "ab90cde24b3319636588d0c35fe03b1333857621051837ed769faefb4c2162e4" 1204 | "checksum httparse 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a6e7a63e511f9edffbab707141fbb8707d1a3098615fb2adbd5769cdfcc9b17d" 1205 | "checksum hyper 0.10.8 (registry+https://github.com/rust-lang/crates.io-index)" = "38368702037feddcb6470b4dc641adcc585373ab037c757bbc2818a21968d051" 1206 | "checksum hyper 0.11.25 (registry+https://github.com/rust-lang/crates.io-index)" = "549dbb86397490ce69d908425b9beebc85bbaad25157d67479d4995bb56fdf9a" 1207 | "checksum hyper-native-tls 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "afe68f772f0497a7205e751626bb8e1718568b58534b6108c73a74ef80483409" 1208 | "checksum hyper-tls 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a5aa51f6ae9842239b0fac14af5f22123b8432b4cc774a44ff059fcba0f675ca" 1209 | "checksum idna 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "6ac85ec3f80c8e4e99d9325521337e14ec7555c458a14e377d189659a427f375" 1210 | "checksum iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dbe6e417e7d0975db6512b90796e8ce223145ac4e33c377e4a42882a0e88bb08" 1211 | "checksum itoa 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "eb2f404fbc66fd9aac13e998248505e7ecb2ad8e44ab6388684c5fb11c6c251c" 1212 | "checksum itoa 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c069bbec61e1ca5a596166e55dfe4773ff745c3d16b700013bcaff9a6df2c682" 1213 | "checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" 1214 | "checksum language-tags 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a91d884b6667cd606bb5a69aa0c99ba811a115fc68915e7056ec08a46e93199a" 1215 | "checksum lazy_static 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "2f61b8421c7a4648c391611625d56fdd5c7567da05af1be655fd8cacc643abb3" 1216 | "checksum lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c8f31047daa365f19be14b47c29df4f7c3b581832407daabe6ae77397619237d" 1217 | "checksum lazycell 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a6f08839bc70ef4a3fe1d566d5350f519c5912ea86be0df1740a7d247c7fc0ef" 1218 | "checksum libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)" = "6fd41f331ac7c5b8ac259b8bf82c75c0fb2e469bbf37d2becbba9a6a2221965b" 1219 | "checksum libflate 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)" = "1a429b86418868c7ea91ee50e9170683f47fd9d94f5375438ec86ec3adb74e8e" 1220 | "checksum log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "5141eca02775a762cc6cd564d8d2c50f67c0ea3a372cbf1c51592b3e029e10ad" 1221 | "checksum log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "89f010e843f2b1a31dbd316b3b8d443758bc634bed37aabade59c686d644e0a2" 1222 | "checksum matches 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "efd7622e3022e1a6eaa602c4cea8912254e5582c9c692e9167714182244801b1" 1223 | "checksum memchr 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1dbccc0e46f1ea47b9f17e6d67c5a96bd27030519c519c9c91327e31275a47b4" 1224 | "checksum memoffset 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0f9dc261e2b62d7a622bf416ea3c5245cdd5d9a7fcc428c0d06804dfce1775b3" 1225 | "checksum mime 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "5514f038123342d01ee5f95129e4ef1e0470c93bc29edf058a46f9ee3ba6737e" 1226 | "checksum mime 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "e2e00e17be181010a91dbfefb01660b17311059dc8c7f48b9017677721e732bd" 1227 | "checksum mime_guess 2.0.0-alpha.4 (registry+https://github.com/rust-lang/crates.io-index)" = "130ea3c9c1b65dba905ab5a4d9ac59234a9585c24d135f264e187fe7336febbd" 1228 | "checksum mio 0.6.14 (registry+https://github.com/rust-lang/crates.io-index)" = "6d771e3ef92d58a8da8df7d6976bfca9371ed1de6619d9d5a5ce5b1f29b85bfe" 1229 | "checksum miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f2f3b1cf331de6896aabf6e9d55dca90356cc9960cca7eaaf408a355ae919" 1230 | "checksum native-tls 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "f74dbadc8b43df7864539cedb7bc91345e532fdd913cfdc23ad94f4d2d40fbc0" 1231 | "checksum net2 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)" = "9044faf1413a1057267be51b5afba8eb1090bd2231c693664aa1db716fe1eae0" 1232 | "checksum nodrop 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "9a2228dca57108069a5262f2ed8bd2e82496d2e074a06d1ccc7ce1687b6ae0a2" 1233 | "checksum num_cpus 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a18c392466409c50b87369414a2680c93e739aedeb498eb2bff7d7eb569744e2" 1234 | "checksum openssl 0.9.24 (registry+https://github.com/rust-lang/crates.io-index)" = "a3605c298474a3aa69de92d21139fb5e2a81688d308262359d85cdd0d12a7985" 1235 | "checksum openssl-sys 0.9.28 (registry+https://github.com/rust-lang/crates.io-index)" = "0bbd90640b148b46305c1691eed6039b5c8509bed16991e3562a01eeb76902a3" 1236 | "checksum pbr 1.0.0-alpha.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2c0434823e05f3f0031a1d9f4323c954543ed66f2cc2bb4700ff539fdd06ce0e" 1237 | "checksum percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "31010dd2e1ac33d5b46a5b413495239882813e0369f8ed8a5e266f173602f831" 1238 | "checksum phf 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)" = "cb325642290f28ee14d8c6201159949a872f220c62af6e110a56ea914fbe42fc" 1239 | "checksum phf_codegen 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)" = "d62594c0bb54c464f633175d502038177e90309daf2e0158be42ed5f023ce88f" 1240 | "checksum phf_generator 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)" = "6b07ffcc532ccc85e3afc45865469bf5d9e4ef5bfcf9622e3cfe80c2d275ec03" 1241 | "checksum phf_shared 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)" = "07e24b0ca9643bdecd0632f2b3da6b1b89bbb0030e0b992afc1113b23a7bc2f2" 1242 | "checksum pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "3a8b4c6b8165cd1a1cd4b9b120978131389f64bdaf456435caa41e630edba903" 1243 | "checksum quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6e920b65c65f10b2ae65c831a81a073a89edd28c7cce89475bff467ab4167a" 1244 | "checksum rand 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)" = "022e0636ec2519ddae48154b028864bdce4eaf7d35226ab8e65c611be97b189d" 1245 | "checksum rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "eba5f8cb59cc50ed56be8880a5c7b496bfd9bd26394e176bc67884094145c2c5" 1246 | "checksum redox_syscall 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)" = "29dbdfd4b9df8ab31dec47c6087b7b13cbf4a776f335e4de8efba8288dda075b" 1247 | "checksum regex 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4278c17d0f6d62dfef0ab00028feb45bd7d2102843f80763474eeb1be8a10c01" 1248 | "checksum regex-syntax 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2f9191b1f57603095f105d317e375d19b1c9c5c3185ea9633a99a6dcbed04457" 1249 | "checksum relay 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1576e382688d7e9deecea24417e350d3062d97e32e45d70b1cde65994ff1489a" 1250 | "checksum reqwest 0.8.5 (registry+https://github.com/rust-lang/crates.io-index)" = "241faa9a8ca28a03cbbb9815a5d085f271d4c0168a19181f106aa93240c22ddb" 1251 | "checksum rustc-serialize 0.3.23 (registry+https://github.com/rust-lang/crates.io-index)" = "684ce48436d6465300c9ea783b6b14c4361d6b8dcbb1375b486a69cc19e2dfb0" 1252 | "checksum rustc_version 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "c5f5376ea5e30ce23c03eb77cbe4962b988deead10910c372b226388b594c084" 1253 | "checksum safemem 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e27a8b19b835f7aea908818e871f5cc3a5a186550c30773be987e155e8163d8f" 1254 | "checksum schannel 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "85fd9df495640643ad2d00443b3d78aae69802ad488debab4f1dd52fc1806ade" 1255 | "checksum scoped-tls 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8674d439c964889e2476f474a3bf198cc9e199e77499960893bac5de7e9218a4" 1256 | "checksum scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "94258f53601af11e6a49f722422f6e3425c52b06245a5cf9bc09908b174f5e27" 1257 | "checksum security-framework 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "dfa44ee9c54ce5eecc9de7d5acbad112ee58755239381f687e564004ba4a2332" 1258 | "checksum security-framework-sys 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "5421621e836278a0b139268f36eee0dc7e389b784dc3f79d8f11aabadf41bead" 1259 | "checksum semver 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)" = "d4f410fedcf71af0345d7607d246e7ad15faaadd49d240ee3b24e5dc21a820ac" 1260 | "checksum serde 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)" = "c2f530d36fb84ec48fb7146936881f026cdbf4892028835fd9398475f82c1bb4" 1261 | "checksum serde_derive 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)" = "10552fad5500771f3902d0c5ba187c5881942b811b7ba0d8fbbfbf84d80806d3" 1262 | "checksum serde_derive_internals 0.15.1 (registry+https://github.com/rust-lang/crates.io-index)" = "37aee4e0da52d801acfbc0cc219eb1eda7142112339726e427926a6f6ee65d3a" 1263 | "checksum serde_json 1.0.16 (registry+https://github.com/rust-lang/crates.io-index)" = "8c6c4e049dc657a99e394bd85c22acbf97356feeec6dbf44150f2dcf79fb3118" 1264 | "checksum serde_urlencoded 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ce0fd303af908732989354c6f02e05e2e6d597152870f2c6990efb0577137480" 1265 | "checksum siphasher 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "0df90a788073e8d0235a67e50441d47db7c8ad9debd91cbf43736a2a92d36537" 1266 | "checksum slab 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "17b4fcaed89ab08ef143da37bc52adbcc04d4a69014f4c1208d6b51f0c47bc23" 1267 | "checksum slab 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fdeff4cd9ecff59ec7e3744cbca73dfe5ac35c2aedb2cfba8a1c715a18912e9d" 1268 | "checksum smallvec 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4c8cbcd6df1e117c2210e13ab5109635ad68a929fcbb8964dc965b76cb5ee013" 1269 | "checksum stderrlog 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e89edb418f6648a284d85ed80fbfdaa37ab258f44a034839535e90f048eed4a8" 1270 | "checksum strsim 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b4d15c810519a91cf877e7e36e63fe068815c678181439f2f29e2562147c3694" 1271 | "checksum syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)" = "d3b891b9015c88c576343b9b3e41c2c11a51c219ef067b264bd9c8aa9b441dad" 1272 | "checksum synom 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a393066ed9010ebaed60b9eafa373d4b1baac186dd7e008555b0f702b51945b6" 1273 | "checksum take 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b157868d8ac1f56b64604539990685fa7611d8fa9e5476cf0c02cf34d32917c5" 1274 | "checksum tempdir 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "87974a6f5c1dfb344d733055601650059a3363de2a6104819293baff662132d6" 1275 | "checksum term_size 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e2b6b55df3198cc93372e85dd2ed817f0e38ce8cc0f22eb32391bfad9c4bf209" 1276 | "checksum thread-id 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4437c97558c70d129e40629a5b385b3fb1ffac301e63941335e4d354081ec14a" 1277 | "checksum thread_local 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "c85048c6260d17cf486ceae3282d9fb6b90be220bf5b28c400f5485ffc29f0c7" 1278 | "checksum time 0.1.36 (registry+https://github.com/rust-lang/crates.io-index)" = "211b63c112206356ef1ff9b19355f43740fc3f85960c598a93d3a3d3ba7beade" 1279 | "checksum tokio 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "be15ef40f675c9fe66e354d74c73f3ed012ca1aa14d65846a33ee48f1ae8d922" 1280 | "checksum tokio-core 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)" = "aeeffbbb94209023feaef3c196a41cbcdafa06b4a6f893f68779bb5e53796f71" 1281 | "checksum tokio-executor 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "8cac2a7883ff3567e9d66bb09100d09b33d90311feca0206c7ca034bc0c55113" 1282 | "checksum tokio-io 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "6af9eb326f64b2d6b68438e1953341e00ab3cf54de7e35d92bfc73af8555313a" 1283 | "checksum tokio-proto 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8fbb47ae81353c63c487030659494b295f6cb6576242f907f203473b191b0389" 1284 | "checksum tokio-reactor 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b3cedc8e5af5131dc3423ffa4f877cce78ad25259a9a62de0613735a13ebc64b" 1285 | "checksum tokio-service 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "24da22d077e0f15f55162bdbdc661228c1581892f52074fb242678d015b45162" 1286 | "checksum tokio-tcp 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ec9b094851aadd2caf83ba3ad8e8c4ce65a42104f7b94d9e6550023f0407853f" 1287 | "checksum tokio-threadpool 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "bf3d05cdd6a78005e535d2b27c21521bdf91fbb321027a62d8e178929d18966d" 1288 | "checksum tokio-timer 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "29a89e4ad0c8f1e4c9860e605c38c69bfdad3cccd4ea446e58ff588c1c07a397" 1289 | "checksum tokio-tls 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "772f4b04e560117fe3b0a53e490c16ddc8ba6ec437015d91fa385564996ed913" 1290 | "checksum tokio-udp 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "137bda266504893ac4774e0ec4c2108f7ccdbcb7ac8dced6305fe9e4e0b5041a" 1291 | "checksum traitobject 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "efd1f82c56340fdf16f2a953d7bda4f8fdffba13d93b00844c25572110b26079" 1292 | "checksum typeable 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1410f6f91f21d1612654e7cc69193b0334f909dcf2c790c4826254fbb86f8887" 1293 | "checksum unicase 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "13a5906ca2b98c799f4b1ab4557b76367ebd6ae5ef14930ec841c74aed5f3764" 1294 | "checksum unicase 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "284b6d3db520d67fbe88fd778c21510d1b0ba4a551e5d0fbb023d33405f6de8a" 1295 | "checksum unicode-bidi 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "d3a078ebdd62c0e71a709c3d53d2af693fe09fe93fbff8344aebe289b78f9032" 1296 | "checksum unicode-normalization 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "e28fa37426fceeb5cf8f41ee273faa7c82c47dc8fba5853402841e665fcd86ff" 1297 | "checksum unicode-segmentation 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "18127285758f0e2c6cf325bb3f3d138a12fee27de4f23e146cd6a179f26c2cf3" 1298 | "checksum unicode-width 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "bf3a113775714a22dcb774d8ea3655c53a32debae63a063acc00a91cc586245f" 1299 | "checksum unicode-xid 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f860d7d29cf02cb2f3f359fd35991af3d30bac52c57d265a3c461074cb4dc" 1300 | "checksum unreachable 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1f2ae5ddb18e1c92664717616dd9549dde73f539f01bd7b77c2edb2446bdff91" 1301 | "checksum url 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f5ba8a749fb4479b043733416c244fa9d1d3af3d7c23804944651c8a448cb87e" 1302 | "checksum utf8-ranges 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "662fab6525a98beff2921d7f61a39e7d59e0b425ebc7d0d9e66d316e55124122" 1303 | "checksum uuid 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "bcc7e3b898aa6f6c08e5295b6c89258d1331e9ac578cc992fb818759951bdc22" 1304 | "checksum vcpkg 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7ed0f6789c8a85ca41bbc1c9d175422116a9869bd1cf31bb08e1493ecce60380" 1305 | "checksum vec_map 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f8cdc8b93bd0198ed872357fb2e667f7125646b1762f16d60b2c96350d361897" 1306 | "checksum version_check 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "6b772017e347561807c1aa192438c5fd74242a670a6cffacc40f2defd1dc069d" 1307 | "checksum void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" 1308 | "checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" 1309 | "checksum winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "04e3bd221fcbe8a271359c04f21a76db7d0c6028862d1bb5512d85e1e2eb5bb3" 1310 | "checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" 1311 | "checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" 1312 | "checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" 1313 | "checksum ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e" 1314 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "youtube-downloader" 3 | version = "0.1.0" 4 | authors = ["smoqadam "] 5 | 6 | [dependencies] 7 | hyper="0.10.8" 8 | hyper-native-tls="0.2.2" 9 | pbr = "1.0.0-alpha.3" 10 | clap="2.23.2" 11 | regex="0.2.1" 12 | log = "0.3" 13 | stderrlog = "0.2" 14 | serde_derive = "1.0" 15 | serde = "1.0" 16 | serde_urlencoded = "0.5.1" 17 | url = "1.0" 18 | 19 | [dev-dependencies] 20 | reqwest = "0.8" 21 | 22 | [[bin]] 23 | name = "youtube-downloader" 24 | path = "src/main.rs" 25 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Saeed Moqadam 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## Rust YouTube Downloader 2 | 3 | YouTube video downloader written in Rust. 4 | 5 | [![Build Status](https://travis-ci.org/smoqadam/rust-youtube-downloader.svg?branch=master)](https://travis-ci.org/smoqadam/rust-youtube-downloader) 6 | 7 | 8 | ## Installation & Usage 9 | 10 | ```bash 11 | $ cargo install youtube-downloader 12 | $ youtube-downloader [youtube video id] 13 | ``` 14 | 15 | for example: 16 | 17 | `youtube-downloader l6zpi90IT1g` 18 | 19 | 20 | ## Development 21 | 22 | ```bash 23 | $ git clone https://github.com/smoqadam/rust-youtube-downloader 24 | $ cd rust-youtube-downloader 25 | $ cargo run -- [youtube video id or youtube URL] 26 | ``` 27 | 28 | For example: 29 | 30 | `$ cargo run -- l6zpi90IT1g` 31 | 32 | 33 | ## Contributing 34 | 35 | This project is for learning purposes and may contain bugs. Please let me know if you find any by opening an issue or send a PR. 36 | -------------------------------------------------------------------------------- /src/lib.rs: -------------------------------------------------------------------------------- 1 | //! Parser for youtube video information as returned by 2 | //! https://youtube.com/get_video_info?video_id={} 3 | 4 | #[macro_use] 5 | extern crate serde_derive; 6 | extern crate serde; 7 | extern crate serde_urlencoded; 8 | extern crate url; 9 | 10 | #[derive(Deserialize, Debug)] 11 | pub struct Stream { 12 | pub url: String, 13 | #[serde(default = "String::new")] 14 | pub quality: String, 15 | #[serde(rename = "type")] 16 | pub stream_type: String, 17 | } 18 | 19 | impl Stream { 20 | pub fn extension(&self) -> Option<&str> { 21 | self.stream_type.split(';') 22 | .next() 23 | .and_then(|mimetype| mimetype.split('/').nth(1)) 24 | } 25 | } 26 | 27 | #[derive(Deserialize, Debug)] 28 | struct VideoInfoResponse { 29 | author: String, 30 | video_id: String, 31 | status: String, 32 | title: String, 33 | thumbnail_url: String, 34 | url_encoded_fmt_stream_map: String, 35 | view_count: usize, 36 | adaptive_fmts: Option, 37 | hlsvp: Option, 38 | } 39 | 40 | impl VideoInfoResponse { 41 | pub fn fmt_streams(&self) -> Result, serde_urlencoded::de::Error> { 42 | let mut result = Vec::new(); 43 | 44 | // this field may be empty 45 | if self.url_encoded_fmt_stream_map.is_empty() { 46 | return Ok(result); 47 | } 48 | 49 | // This field has a list of encoded stream dicts separated by commas 50 | for input in self.url_encoded_fmt_stream_map.split(',') { 51 | result.push(serde_urlencoded::from_str(input)?); 52 | } 53 | Ok(result) 54 | } 55 | 56 | pub fn adaptive_streams(&self) -> Result, serde_urlencoded::de::Error> { 57 | let mut result = Vec::new(); 58 | if let Some(ref fmts) = self.adaptive_fmts { 59 | // This field has a list of encoded stream dicts separated by commas 60 | for input in fmts.split(',') { 61 | result.push(serde_urlencoded::from_str(input)?); 62 | } 63 | } 64 | Ok(result) 65 | } 66 | } 67 | 68 | #[derive(Debug)] 69 | pub struct VideoInfo { 70 | pub author: String, 71 | pub video_id: String, 72 | pub title: String, 73 | pub thumbnail_url: String, 74 | pub streams: Vec, 75 | pub view_count: usize, 76 | pub adaptive_streams: Vec, 77 | /// Video URL for videos with HLS streams 78 | pub hlsvp: Option, 79 | } 80 | 81 | impl VideoInfo { 82 | pub fn parse(inp: &str) -> Result { 83 | let resp: VideoInfoResponse = match serde_urlencoded::from_str(inp) { 84 | Ok(r) => r, 85 | Err(original_err) => { 86 | // attempt to decode error info 87 | let error_info: ErrorInfo = match serde_urlencoded::from_str(inp) { 88 | Ok(error_info) => error_info, 89 | Err(_) => return Err(Error::from(original_err)), 90 | }; 91 | return Err(Error::from(error_info)); 92 | } 93 | }; 94 | let streams = resp.fmt_streams()?; 95 | let adaptive_streams = resp.adaptive_streams()?; 96 | Ok(VideoInfo { 97 | author: resp.author, 98 | video_id: resp.video_id, 99 | title: resp.title, 100 | thumbnail_url: resp.thumbnail_url, 101 | streams: streams, 102 | view_count: resp.view_count, 103 | adaptive_streams: adaptive_streams, 104 | hlsvp: resp.hlsvp, 105 | }) 106 | } 107 | } 108 | 109 | #[derive(Deserialize, Debug)] 110 | pub struct ErrorInfo { 111 | pub reason: String, 112 | } 113 | 114 | #[derive(Debug)] 115 | pub enum Error { 116 | JsonError(serde_urlencoded::de::Error), 117 | Youtube(ErrorInfo), 118 | Url(url::ParseError), 119 | UrlMissingVAttr, 120 | } 121 | 122 | impl From for Error { 123 | fn from(e: serde_urlencoded::de::Error) -> Self { 124 | Error::JsonError(e) 125 | } 126 | } 127 | 128 | impl From for Error { 129 | fn from(e: ErrorInfo) -> Self { 130 | Error::Youtube(e) 131 | } 132 | } 133 | 134 | impl From for Error { 135 | fn from(e: url::ParseError) -> Self { 136 | Error::Url(e) 137 | } 138 | } 139 | 140 | /// The URL to grab video information, the video_id is passed in as a query argument. 141 | /// 142 | /// See 'video_info_url()'. 143 | pub const GET_VIDEO_INFO_URL: &str = "https://youtube.com/get_video_info"; 144 | 145 | /// Build the URL to retrieve the video information from a video id 146 | pub fn video_info_url(vid: &str) -> String { 147 | let vid = url::percent_encoding::utf8_percent_encode(vid, url::percent_encoding::DEFAULT_ENCODE_SET).to_string(); 148 | format!("{}?video_id={}", GET_VIDEO_INFO_URL, vid) 149 | } 150 | 151 | /// Build the URL to retrieve the video information from a video url 152 | pub fn video_info_url_from_url(video_url: &str) -> Result { 153 | let url = url::Url::parse(video_url)?; 154 | 155 | let mut vid = None; 156 | for (name, value) in url.query_pairs() { 157 | if name == "v" { 158 | vid = Some(value); 159 | } 160 | } 161 | 162 | let vid = vid.ok_or(Error::UrlMissingVAttr)?; 163 | let vid = url::percent_encoding::utf8_percent_encode(&vid, url::percent_encoding::DEFAULT_ENCODE_SET).to_string(); 164 | Ok(format!("{}?video_id={}", GET_VIDEO_INFO_URL, vid)) 165 | } 166 | -------------------------------------------------------------------------------- /src/main.rs: -------------------------------------------------------------------------------- 1 | extern crate hyper; 2 | extern crate hyper_native_tls; 3 | extern crate pbr; 4 | extern crate clap; 5 | extern crate regex; 6 | extern crate stderrlog; 7 | #[macro_use] 8 | extern crate log; 9 | extern crate youtube_downloader; 10 | 11 | use pbr::ProgressBar; 12 | use std::{process,str}; 13 | use hyper::client::response::Response; 14 | use hyper::Client; 15 | use hyper::net::HttpsConnector; 16 | use hyper_native_tls::NativeTlsClient; 17 | use hyper::header::ContentLength; 18 | use std::io::Read; 19 | use std::io::prelude::*; 20 | use std::fs::File; 21 | use clap::{Arg, App}; 22 | use regex::Regex; 23 | use youtube_downloader::VideoInfo; 24 | 25 | fn main() { 26 | //Regex for youtube URLs. 27 | let url_regex = Regex::new(r"^.*(?:(?:youtu\.be/|v/|vi/|u/w/|embed/)|(?:(?:watch)?\?v(?:i)?=|\&v(?:i)?=))([^#\&\?]*).*").unwrap(); 28 | let args = App::new("youtube-downloader") 29 | .version("0.1.0") 30 | .arg(Arg::with_name("verbose") 31 | .help("Increase verbosity") 32 | .short("v") 33 | .multiple(true) 34 | .long("verbose")) 35 | .arg(Arg::with_name("adaptive") 36 | .help("List adaptive streams, instead of video streams") 37 | .short("A") 38 | .long("adaptive")) 39 | .arg(Arg::with_name("video-id") 40 | .help("The ID of the video to download.") 41 | .required(true) 42 | .index(1)) 43 | .get_matches(); 44 | 45 | stderrlog::new() 46 | .module(module_path!()) 47 | .verbosity(args.occurrences_of("verbose") as usize) 48 | .init() 49 | .expect("Unable to initialize stderr output"); 50 | 51 | let mut vid = args.value_of("video-id").unwrap(); 52 | if url_regex.is_match(vid) { 53 | let vid_split = url_regex.captures(vid).unwrap(); 54 | vid = vid_split.get(1).unwrap().as_str(); 55 | } 56 | let url = format!("https://youtube.com/get_video_info?video_id={}", vid); 57 | download(&url, args.is_present("adaptive")); 58 | } 59 | 60 | fn download(url: &str, adaptive: bool) { 61 | debug!("Fetching video info from {}", url); 62 | let mut response = send_request(url); 63 | let mut response_str = String::new(); 64 | response.read_to_string(&mut response_str).unwrap(); 65 | trace!("Response {}", response_str); 66 | let info = VideoInfo::parse(&response_str).unwrap(); 67 | debug!("Video info {:#?}", info); 68 | 69 | let streams = if adaptive { 70 | info.adaptive_streams 71 | } else { 72 | info.streams 73 | }; 74 | 75 | for (i, stream) in streams.iter().enumerate() { 76 | println!("{}- {} {}", 77 | i, 78 | stream.quality, 79 | stream.stream_type); 80 | } 81 | 82 | println!("Choose quality (0): "); 83 | let input = read_line().trim().parse().unwrap_or(0); 84 | 85 | println!("Please wait..."); 86 | 87 | if let Some(ref stream) = streams.get(input) { 88 | // get response from selected quality 89 | debug!("Downloading {}", url); 90 | let response = send_request(&stream.url); 91 | println!("Download is starting..."); 92 | 93 | // get file size from Content-Length header 94 | let file_size = get_file_size(&response); 95 | 96 | let filename = match stream.extension() { 97 | Some(ext) => format!("{}.{}", info.title, ext), 98 | None => info.title, 99 | }; 100 | 101 | // write file to disk 102 | write_file(response, &filename, file_size); 103 | } else { 104 | error!("Invalid stream index"); 105 | } 106 | } 107 | 108 | // get file size from Content-Length header 109 | fn get_file_size(response: &Response) -> u64 { 110 | let mut file_size = 0; 111 | match response.headers.get::(){ 112 | Some(length) => file_size = length.0, 113 | None => println!("Content-Length header missing"), 114 | }; 115 | file_size 116 | } 117 | 118 | fn write_file(mut response: Response, title: &str, file_size: u64) { 119 | // initialize progressbar 120 | let mut pb = ProgressBar::new(file_size); 121 | pb.format("╢▌▌░╟"); 122 | 123 | // Download and write to file 124 | let mut buf = [0; 128 * 1024]; 125 | let mut file = File::create(title).unwrap(); 126 | loop { 127 | match response.read(&mut buf) { 128 | Ok(len) => { 129 | file.write_all(&buf[..len]).unwrap(); 130 | pb.add(len as u64); 131 | if len == 0 { 132 | break; 133 | } 134 | len 135 | } 136 | Err(why) => panic!("{}", why), 137 | }; 138 | } 139 | } 140 | 141 | fn send_request(url: &str) -> Response { 142 | let ssl = NativeTlsClient::new().unwrap(); 143 | let connector = HttpsConnector::new(ssl); 144 | let client = Client::with_connector(connector); 145 | client.get(url).send().unwrap_or_else(|e| { 146 | error!("Network request failed: {}", e); 147 | process::exit(1); 148 | }) 149 | } 150 | 151 | fn read_line() -> String { 152 | let mut input = String::new(); 153 | std::io::stdin() 154 | .read_line(&mut input) 155 | .expect("Could not read stdin!"); 156 | input 157 | } 158 | -------------------------------------------------------------------------------- /tests/lib.rs: -------------------------------------------------------------------------------- 1 | 2 | extern crate youtube_downloader; 3 | extern crate reqwest; 4 | 5 | use std::io::Read; 6 | use youtube_downloader::{video_info_url_from_url, VideoInfo}; 7 | 8 | fn get_video_info(url: &str) -> VideoInfo { 9 | let info_url = youtube_downloader::video_info_url_from_url(url).unwrap(); 10 | let mut resp = reqwest::get(&info_url).unwrap(); 11 | let mut data = String::new(); 12 | resp.read_to_string(&mut data).unwrap(); 13 | youtube_downloader::VideoInfo::parse(&data).unwrap() 14 | } 15 | 16 | #[test] 17 | fn live_video() { 18 | get_video_info("https://www.youtube.com/watch?v=XOacA3RYrXk"); 19 | } 20 | 21 | #[test] 22 | fn video() { 23 | get_video_info("https://www.youtube.com/watch?v=aqz-KE-bpKQ"); 24 | } 25 | --------------------------------------------------------------------------------