treehouse-dl 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e00c2217e678eb63478a7fa97efaa6144fb3228a
4
- data.tar.gz: c8ff63270a61a9e207277a6ddff67eb29c5613aa
3
+ metadata.gz: 0e16f98ba26b97bd031d89a699f781683226f0d4
4
+ data.tar.gz: 3bbe13aba8908909ac05c7310116de18563dabb0
5
5
  SHA512:
6
- metadata.gz: caa5ac05b19057864b4f05d951aa365a79db63c39e0bf9d4972b7d2566b29cb39e0d9761789fed3011a38730cb36d84d5b64d62328b386c9255dbbc438008431
7
- data.tar.gz: d965df1e3ba85646a993c4c9c943fddeb41611789debf10a38e0a21b3a19db0b85862cc0841ee437ac9d1dc5927645559d7fe719f96623062f20282a5ad4880c
6
+ metadata.gz: ce582e7035a5f77797be473ba2b73964526561051d67a9fe26882dec55abb8f06e9bc604a2e4a117ae413877456f93e085e025a8c132137efaf5bd6610280649
7
+ data.tar.gz: 339e2d6bc415aca194c9b0567e08952e2130d1441bb3bd021aef285d6314f65f6afd04b797272fe6235b5ab88d456fd442b35239dc42c62f6919c1582e14817e
data/README.md CHANGED
@@ -1,2 +1,40 @@
1
- # treehouse-dl
1
+ # treehouse-dl[![Gem Version](https://badge.fury.io/rb/treehouse-dl.svg)](https://badge.fury.io/rb/treehouse-dl)
2
2
  Download Treehouse videos without pro membership
3
+
4
+ Now you can download Treehouse videos easily. You need account with any membership (even trailer)
5
+
6
+ ## Installation
7
+
8
+ ```
9
+ gem install treehouse-dl
10
+ ```
11
+
12
+ ### Manual installation
13
+ ```sh
14
+ user@User ~ $ git clone https://github.com/0x2C6/treehouse-dl.git
15
+ user@User ~ $ cd treehouse-dl
16
+ user@User ~ $ bundle
17
+ user@User ~ $ chmod +x setup.rb
18
+ user@User ~ $ ./setup.rb
19
+ ```
20
+
21
+
22
+ ## Usage
23
+
24
+ ```
25
+ treehouse-dl -e EMAIL -p PASSWORD -u URL
26
+ ```
27
+
28
+
29
+
30
+ You have to fill all sections!
31
+ Else it won't work
32
+ Please write valid course url
33
+
34
+ ### Example
35
+
36
+ ```
37
+ treehouse-dl -e example@email.com -p 123456aA -u https://teamtreehouse.com/library/unit-testing-in-java
38
+ ```
39
+
40
+ This is beta versions and include some errors . Please create new issue if you get any error.
@@ -0,0 +1,29 @@
1
+ ---
2
+ prefix: "/Users/farhad/.rvm/rubies/ruby-2.4.0"
3
+ bindir: "/Users/farhad/.rvm/rubies/ruby-2.4.0/bin"
4
+ libdir: "/Users/farhad/.rvm/rubies/ruby-2.4.0/lib"
5
+ datadir: "/Users/farhad/.rvm/rubies/ruby-2.4.0/share"
6
+ mandir: "/Users/farhad/.rvm/rubies/ruby-2.4.0/share/man"
7
+ docdir: "/Users/farhad/.rvm/rubies/ruby-2.4.0/share/doc"
8
+ rbdir: "/Users/farhad/.rvm/rubies/ruby-2.4.0/lib/ruby/site_ruby/2.4.0"
9
+ sodir: "/Users/farhad/.rvm/rubies/ruby-2.4.0/lib/ruby/site_ruby/2.4.0/x86_64-darwin16"
10
+ sysconfdir: "/etc"
11
+ localstatedir: "/var"
12
+ libruby: "/Users/farhad/.rvm/rubies/ruby-2.4.0/lib/ruby"
13
+ librubyver: "/Users/farhad/.rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0"
14
+ librubyverarch: "/Users/farhad/.rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/x86_64-darwin16"
15
+ siteruby: "/Users/farhad/.rvm/rubies/ruby-2.4.0/lib/ruby/site_ruby"
16
+ siterubyver: "/Users/farhad/.rvm/rubies/ruby-2.4.0/lib/ruby/site_ruby/2.4.0"
17
+ siterubyverarch: "/Users/farhad/.rvm/rubies/ruby-2.4.0/lib/ruby/site_ruby/2.4.0/x86_64-darwin16"
18
+ rubypath: "/Users/farhad/.rvm/rubies/ruby-2.4.0/bin/ruby"
19
+ rubyprog: "/Users/farhad/.rvm/rubies/ruby-2.4.0/bin/ruby"
20
+ makeprog: make
21
+ extconfopt: ''
22
+ shebang: ruby
23
+ no_test: true
24
+ no_doc: true
25
+ no_ext: false
26
+ install_prefix:
27
+ root:
28
+ installdirs: site
29
+ type: site
@@ -0,0 +1,14 @@
1
+ /Users/farhad/.rvm/rubies/ruby-2.4.0/bin/treehouse-dl
2
+ /Users
3
+ /Users/farhad
4
+ /Users/farhad/.rvm
5
+ /Users/farhad/.rvm/rubies
6
+ /Users/farhad/.rvm/rubies/ruby-2.4.0
7
+ /Users/farhad/.rvm/rubies/ruby-2.4.0/lib
8
+ /Users/farhad/.rvm/rubies/ruby-2.4.0/lib/ruby
9
+ /Users/farhad/.rvm/rubies/ruby-2.4.0/lib/ruby/site_ruby
10
+ /Users/farhad/.rvm/rubies/ruby-2.4.0/lib/ruby/site_ruby/2.4.0
11
+ /Users/farhad/.rvm/rubies/ruby-2.4.0/lib/ruby/site_ruby/2.4.0/treehouse-dl
12
+ /Users/farhad/.rvm/rubies/ruby-2.4.0/lib/ruby/site_ruby/2.4.0/treehouse-dl/downloader.rb
13
+ /Users/farhad/.rvm/rubies/ruby-2.4.0/lib/ruby/site_ruby/2.4.0/treehouse-dl/options.rb
14
+ /Users/farhad/.rvm/rubies/ruby-2.4.0/lib/ruby/site_ruby/2.4.0/treehouse-dl/runner.rb
@@ -1,6 +1,5 @@
1
1
  require_relative 'runner'
2
2
  require 'selenium-webdriver'
3
- require 'phantomjs'
4
3
  require 'shell'
5
4
  require 'mechanize'
6
5
  require 'spinning_cursor'
@@ -12,7 +11,9 @@ require 'fileutils'
12
11
  module Treehouse
13
12
  class Downloader
14
13
  def self.valid(url)
15
- driver = Selenium::WebDriver.for :phantomjs
14
+ options = Selenium::WebDriver::Chrome::Options.new
15
+ options.add_argument('--headless')
16
+ driver = Selenium::WebDriver.for :chrome, options: options
16
17
  driver.navigate.to url
17
18
  course_page = driver.page_source
18
19
  course_page_paths = course_page.split(' ').select{ |i| i =~ /library/ }.select{ |i| i =~ /href/ }.uniq
@@ -1,5 +1,5 @@
1
1
  require 'optparse'
2
-
2
+ $VERSION = '0.0.4'
3
3
  module Treehouse
4
4
  class Options
5
5
 
@@ -26,6 +26,10 @@ module Treehouse
26
26
  puts opts
27
27
  exit
28
28
  end
29
+ opts.on("-v","--version", "Show version") do
30
+ puts $VERSION
31
+ exit
32
+ end
29
33
  begin
30
34
  argv = ['-h'] if argv.empty?
31
35
  opts.parse!(argv)
Binary file
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "treehouse-dl"
3
3
  s.summary = "Download videos form Treehouse without pro account"
4
- s.version = '0.0.3'
4
+ s.version = '0.0.4'
5
5
  s.authors = ["Farhad"]
6
6
  s.email = "Farhad9801@gmail.com"
7
7
  s.files = Dir['**/**']
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: treehouse-dl
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Farhad
@@ -117,12 +117,15 @@ files:
117
117
  - Gemfile.lock
118
118
  - LICENSE
119
119
  - README.md
120
+ - SetupConfig
121
+ - SetupReceipt
120
122
  - bin/treehouse-dl
121
123
  - credentials
122
124
  - lib/treehouse-dl/downloader.rb
123
125
  - lib/treehouse-dl/options.rb
124
126
  - lib/treehouse-dl/runner.rb
125
127
  - setup.rb
128
+ - treehouse-dl-0.0.3.gem
126
129
  - treehouse-dl.gemspec
127
130
  homepage: http://rubygems.org/gems/treehouse-dl
128
131
  licenses: