youtube_audio 0.1.0 → 0.2.0
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/.rubocop_todo.yml +7 -7
- data/.travis.yml +8 -0
- data/Gemfile.lock +3 -3
- data/README.md +16 -4
- data/fixtures/vcr_cassettes/youtube/player_base_js.yml +5982 -0
- data/fixtures/vcr_cassettes/youtube/xoWRkd3oGcs.yml +6007 -30
- data/lib/youtube_audio/decipher.rb +22 -20
- data/lib/youtube_audio/extract_decode_function.rb +39 -0
- data/lib/youtube_audio/format.rb +10 -2
- data/lib/youtube_audio/player_response.rb +5 -2
- data/lib/youtube_audio/script_parser.rb +5 -1
- data/lib/youtube_audio/url_decipher.rb +6 -4
- data/lib/youtube_audio/version.rb +1 -1
- data/lib/youtube_audio.rb +2 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7397b3a7c145702b1c8bd75ecf2c51e39552feac16b4664294e09acbe6bcee95
|
4
|
+
data.tar.gz: 95075774c551be2feb31f67db497f72abb0d84e35989c0c5874799d4d564cc62
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b0182e9b5db795f0efc2aea5269a5078b6a9340891c6ce9b913ea9c0ab45256c6c4638bdc1c2f35a6896747bcab0a336e0d8ba8babb36dc0b30320d4d236bc44
|
7
|
+
data.tar.gz: 99fcab7827f9f65d82ad6edbfe63fa7fdee9a554428b948c68954aef72a732be12ec818b4795c0bf4b11efd5988f38688e5ae3eabdef52f3308e5ebb3ae86240
|
data/.rubocop_todo.yml
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
# This configuration was generated by
|
2
2
|
# `rubocop --auto-gen-config`
|
3
|
-
# on 2019-09-
|
3
|
+
# on 2019-09-17 22:24:06 -0500 using RuboCop version 0.74.0.
|
4
4
|
# The point is for the user to remove these configuration records
|
5
5
|
# one by one as the offenses are removed from the code base.
|
6
6
|
# Note that changes in the inspected code, or installation of new
|
7
7
|
# versions of RuboCop, may require this file to be generated again.
|
8
8
|
|
9
|
-
# Offense count:
|
10
|
-
#
|
11
|
-
#
|
12
|
-
|
13
|
-
|
14
|
-
|
9
|
+
# Offense count: 4
|
10
|
+
# Cop supports --auto-correct.
|
11
|
+
# Configuration parameters: AutoCorrect, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
|
12
|
+
# URISchemes: http, https
|
13
|
+
Metrics/LineLength:
|
14
|
+
Max: 109
|
data/.travis.yml
CHANGED
@@ -5,3 +5,11 @@ cache: bundler
|
|
5
5
|
rvm:
|
6
6
|
- 2.6.3
|
7
7
|
before_install: gem install bundler -v 1.17.2
|
8
|
+
before_script:
|
9
|
+
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
|
10
|
+
- chmod +x ./cc-test-reporter
|
11
|
+
- ./cc-test-reporter before-build
|
12
|
+
script:
|
13
|
+
- bundle exec rspec
|
14
|
+
after_script:
|
15
|
+
- ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
youtube_audio (0.
|
4
|
+
youtube_audio (0.2.0)
|
5
5
|
mechanize
|
6
6
|
mini_racer
|
7
7
|
|
@@ -33,9 +33,9 @@ GEM
|
|
33
33
|
nokogiri (~> 1.6)
|
34
34
|
ntlm-http (~> 0.1, >= 0.1.1)
|
35
35
|
webrobots (>= 0.0.9, < 0.2)
|
36
|
-
mime-types (3.
|
36
|
+
mime-types (3.3)
|
37
37
|
mime-types-data (~> 3.2015)
|
38
|
-
mime-types-data (3.2019.
|
38
|
+
mime-types-data (3.2019.0904)
|
39
39
|
mini_portile2 (2.4.0)
|
40
40
|
mini_racer (0.2.6)
|
41
41
|
libv8 (>= 6.9.411)
|
data/README.md
CHANGED
@@ -2,6 +2,18 @@
|
|
2
2
|
This gem can extract videos from youtube in audio format using webscraping techniques
|
3
3
|
</p>
|
4
4
|
|
5
|
+
# Todo
|
6
|
+
|
7
|
+
- [x] Search Videos :mag:
|
8
|
+
- [x] Download audio only :sound:
|
9
|
+
- [x] Supports download cipher videos :key:
|
10
|
+
- [x] Test coverage 100% :guardsman:
|
11
|
+
- [ ] Add yard to document the project :exclamation:
|
12
|
+
- [ ] Supports pagination in the Search :bulb:
|
13
|
+
|
14
|
+
<a href="https://codeclimate.com/github/jdaviderb/youtube-audio/maintainability"><img src="https://api.codeclimate.com/v1/badges/9ff835347572374cb547/maintainability" /></a> [](https://travis-ci.org/jdaviderb/youtube-audio) <a href="https://codeclimate.com/github/jdaviderb/youtube-audio/test_coverage"><img src="https://api.codeclimate.com/v1/badges/9ff835347572374cb547/test_coverage" /></a>
|
15
|
+
|
16
|
+
|
5
17
|
# Features :rocket:
|
6
18
|
|
7
19
|
### Download a video in audio format :musical_note:
|
@@ -24,16 +36,16 @@ puts youtube.formats # Array<YoutubeAudio::Format>
|
|
24
36
|
# ]
|
25
37
|
```
|
26
38
|
|
27
|
-
### Search videos in youtube :
|
39
|
+
### Search videos in youtube :mag:
|
28
40
|
|
29
41
|
```ruby
|
30
42
|
require 'youtube_audio'
|
31
43
|
|
32
|
-
search_items = YoutubeAudio::Search.new('la vida boheme - flamingo').results # Array<YoutubeAudio::
|
44
|
+
search_items = YoutubeAudio::Search.new('la vida boheme - flamingo').results # Array<YoutubeAudio::SearchItem>
|
33
45
|
|
34
46
|
puts search_items.first.title # La Vida Boheme - Flamingo
|
35
47
|
puts search_items.first.description # Official Music Video
|
36
|
-
puts search_items.first # Array<YoutubeAudio::Format>
|
48
|
+
puts search_items.first.formats # Array<YoutubeAudio::Format>
|
37
49
|
|
38
50
|
# =>
|
39
51
|
# [
|
@@ -61,7 +73,7 @@ Or install it yourself as:
|
|
61
73
|
|
62
74
|
## Contributing
|
63
75
|
|
64
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/jdaviderb/
|
76
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/jdaviderb/youtube-audio. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
65
77
|
|
66
78
|
## License
|
67
79
|
|