treehouse-dl 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +39 -1
- data/SetupConfig +29 -0
- data/SetupReceipt +14 -0
- data/lib/treehouse-dl/downloader.rb +3 -2
- data/lib/treehouse-dl/options.rb +5 -1
- data/treehouse-dl-0.0.3.gem +0 -0
- data/treehouse-dl.gemspec +1 -1
- metadata +4 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0e16f98ba26b97bd031d89a699f781683226f0d4
|
4
|
+
data.tar.gz: 3bbe13aba8908909ac05c7310116de18563dabb0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ce582e7035a5f77797be473ba2b73964526561051d67a9fe26882dec55abb8f06e9bc604a2e4a117ae413877456f93e085e025a8c132137efaf5bd6610280649
|
7
|
+
data.tar.gz: 339e2d6bc415aca194c9b0567e08952e2130d1441bb3bd021aef285d6314f65f6afd04b797272fe6235b5ab88d456fd442b35239dc42c62f6919c1582e14817e
|
data/README.md
CHANGED
@@ -1,2 +1,40 @@
|
|
1
|
-
# treehouse-dl
|
1
|
+
# treehouse-dl[](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.
|
data/SetupConfig
ADDED
@@ -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
|
data/SetupReceipt
ADDED
@@ -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
|
-
|
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
|
data/lib/treehouse-dl/options.rb
CHANGED
@@ -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
|
data/treehouse-dl.gemspec
CHANGED
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.
|
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:
|