Giter Site home page Giter Site logo

acts_as_unvlogable's Issues

Youtube not working as provider anymore

Just a small heads up: the youtube_it gem is not working anymore.

Youtube finally switched off the V2 of their Data API on May 6th 2015 (source). The gem's author seems to be unresponsive to the new situation (kylejginavan/youtube_it#251) so, right now, this gem seems to be a dead end.

As mentioned in the previous link, some people is migrating to http://github.com/Fullscreen/yt. They support v3 and have a migration document: https://github.com/Fullscreen/yt/blob/master/YOUTUBE_IT.md. Unfortunately this gem requires ruby '>= 1.9.3' so if you switch to it, this new interpreter requirement should be stated in the acts_as_unvlogable gemspec.

Vimeo API call changed

The "vg_vimeo.rb" file needs to be updated. I have a working copy but cant paste it into here. The API has changed.

error in UnvlogIt#title on valid rutube url

Hi mamuso,
I tried to parse random Rutube url from the main page http://rutube.ru/video/536e5c9548348e7ee9cdfcc5e1f149ea/ and got an error. Does Rutube respond with invalid XML?

Loading development environment (Rails 3.2.8)
1.9.3p194 :001 > aha = UnvlogIt.new 'http://rutube.ru/video/536e5c9548348e7ee9cdfcc5e1f149ea/'
 => #<UnvlogIt:0xbb8d4e4 @object=#<VgRutube:0xbb8ce68 @url="http://rutube.ru/video/536e5c9548348e7ee9cdfcc5e1f149ea/", @movie_id="536">> 
1.9.3p194 :002 > aha.title
REXML::ParseException: #<REXML::ParseException: Missing end tag for 'hr' (got "body")
Line: 6
Position: 175
Last 80 unconsumed characters:
>
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/rexml/parsers/baseparser.rb:335:in `pull_event'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/rexml/parsers/baseparser.rb:183:in `pull'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/rexml/parsers/treeparser.rb:22:in `parse'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/rexml/document.rb:231:in `build'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/rexml/document.rb:43:in `initialize'
/usr/local/rvm/gems/ruby-1.9.3-p194/gems/xml-simple-1.1.2/lib/xmlsimple.rb:965:in `new'
/usr/local/rvm/gems/ruby-1.9.3-p194/gems/xml-simple-1.1.2/lib/xmlsimple.rb:965:in `parse'
/usr/local/rvm/gems/ruby-1.9.3-p194/gems/xml-simple-1.1.2/lib/xmlsimple.rb:164:in `xml_in'
/usr/local/rvm/gems/ruby-1.9.3-p194/gems/xml-simple-1.1.2/lib/xmlsimple.rb:203:in `xml_in'
/usr/local/rvm/gems/ruby-1.9.3-p194/gems/acts_as_unvlogable-1.0.0/lib/acts_as_unvlogable/vg_rutube.rb:69:in `rt_info'
/usr/local/rvm/gems/ruby-1.9.3-p194/gems/acts_as_unvlogable-1.0.0/lib/acts_as_unvlogable/vg_rutube.rb:9:in `title'
/usr/local/rvm/gems/ruby-1.9.3-p194/gems/acts_as_unvlogable-1.0.0/lib/acts_as_unvlogable.rb:33:in `title'
(irb):2:in `irb_binding'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/irb/workspace.rb:80:in `eval'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/irb/workspace.rb:80:in `evaluate'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/irb/context.rb:254:in `evaluate'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/irb.rb:159:in `block (2 levels) in eval_input'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/irb.rb:273:in `signal_status'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/irb.rb:156:in `block in eval_input'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/irb/ruby-lex.rb:243:in `block (2 levels) in each_top_level_statement'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/irb/ruby-lex.rb:229:in `loop'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/irb/ruby-lex.rb:229:in `block in each_top_level_statement'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/irb/ruby-lex.rb:228:in `catch'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/irb/ruby-lex.rb:228:in `each_top_level_statement'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/irb.rb:155:in `eval_input'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/irb.rb:70:in `block in start'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/irb.rb:69:in `catch'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/irb.rb:69:in `start'
/usr/local/rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.8/lib/rails/commands/console.rb:47:in `start'
/usr/local/rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.8/lib/rails/commands/console.rb:8:in `start'
/usr/local/rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.8/lib/rails/commands.rb:41:in `<top (required)>'
script/rails:6:in `require'
script/rails:6:in `<main>'
...
Missing end tag for 'hr' (got "body")
Line: 6
Position: 175
Last 80 unconsumed characters:

Line: 6
Position: 175
Last 80 unconsumed characters:

    from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/rexml/parsers/treeparser.rb:95:in `rescue in parse'
    from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/rexml/parsers/treeparser.rb:20:in `parse'
    from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/rexml/document.rb:231:in `build'
    from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/rexml/document.rb:43:in `initialize'
    from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/xml-simple-1.1.2/lib/xmlsimple.rb:965:in `new'
    from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/xml-simple-1.1.2/lib/xmlsimple.rb:965:in `parse'
    from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/xml-simple-1.1.2/lib/xmlsimple.rb:164:in `xml_in'
    from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/xml-simple-1.1.2/lib/xmlsimple.rb:203:in `xml_in'
    from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/acts_as_unvlogable-1.0.0/lib/acts_as_unvlogable/vg_rutube.rb:69:in `rt_info'
    from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/acts_as_unvlogable-1.0.0/lib/acts_as_unvlogable/vg_rutube.rb:9:in `title'
    from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/acts_as_unvlogable-1.0.0/lib/acts_as_unvlogable.rb:33:in `title'
    from (irb):2
    from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.8/lib/rails/commands/console.rb:47:in `start'
    from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.8/lib/rails/commands/console.rb:8:in `start'
    from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.8/lib/rails/commands.rb:41:in `<top (required)>'
    from script/rails:6:in `require'
    from script/rails:6:in `<main>'1.9.3p194 :003 > aha.embed_url
 => nil 

Unsuported url or service

Hi, I'm using the latest version and I'm getting this error when trying to use youtube urls (I have the google api key in the config).

Gem Tests are also failing

[Coveralls] Set up the SimpleCov formatter.
[Coveralls] Using SimpleCov's default settings.
..FF..FF..FF...........................

Failures:

  1) UnvlogIt with an existent youtube url initialize a VgYoutube instance
     Failure/Error: let(:videotron) { UnvlogIt.new("http://www.youtube.com/watch?v=MVa4q-YVjD8", {:key => "AIzaSyCWdV1zQpyD1X1OdheU6UqfV3JR6JQXY9A" }) } # => Keith Moon??s drum kit explodes
     ArgumentError:
       Unsuported url or service
     # ./lib/acts_as_unvlogable/vg_youtube.rb:20:in `rescue in initialize'
     # ./lib/acts_as_unvlogable/vg_youtube.rb:16:in `initialize'
     # ./lib/acts_as_unvlogable.rb:103:in `new'
     # ./lib/acts_as_unvlogable.rb:103:in `service_object'
     # ./lib/acts_as_unvlogable.rb:86:in `load_service'
     # ./lib/acts_as_unvlogable.rb:26:in `initialize'
     # ./spec/acts_as_unvlogable_spec.rb:22:in `new'
     # ./spec/acts_as_unvlogable_spec.rb:22:in `block (3 levels) in <top (required)>'
     # ./spec/acts_as_unvlogable_spec.rb:25:in `block (3 levels) in <top (required)>'

  2) UnvlogIt with an existent youtube url returns the video properties
     Failure/Error: let(:videotron) { UnvlogIt.new("http://www.youtube.com/watch?v=MVa4q-YVjD8", {:key => "AIzaSyCWdV1zQpyD1X1OdheU6UqfV3JR6JQXY9A" }) } # => Keith Moon??s drum kit explodes
     ArgumentError:
       Unsuported url or service
     # ./lib/acts_as_unvlogable/vg_youtube.rb:20:in `rescue in initialize'
     # ./lib/acts_as_unvlogable/vg_youtube.rb:16:in `initialize'
     # ./lib/acts_as_unvlogable.rb:103:in `new'
     # ./lib/acts_as_unvlogable.rb:103:in `service_object'
     # ./lib/acts_as_unvlogable.rb:86:in `load_service'
     # ./lib/acts_as_unvlogable.rb:26:in `initialize'
     # ./spec/acts_as_unvlogable_spec.rb:22:in `new'
     # ./spec/acts_as_unvlogable_spec.rb:22:in `block (3 levels) in <top (required)>'
     # ./spec/acts_as_unvlogable_spec.rb:348:in `check_video_attributes'
     # ./spec/acts_as_unvlogable_spec.rb:32:in `block (3 levels) in <top (required)>'

  3) UnvlogIt with a shortened youtube URL initialize a VgYoutube instance
     Failure/Error: let(:videotron) { UnvlogIt.new("http://youtu.be/4pzMBtPMUq8", {:key => "AIzaSyCWdV1zQpyD1X1OdheU6UqfV3JR6JQXY9A" }) } # => Keith Moon??s drum kit explodes
     ArgumentError:
       Unsuported url or service
     # ./lib/acts_as_unvlogable/vg_youtube.rb:20:in `rescue in initialize'
     # ./lib/acts_as_unvlogable/vg_youtube.rb:16:in `initialize'
     # ./lib/acts_as_unvlogable/vg_youtu.rb:9:in `initialize'
     # ./lib/acts_as_unvlogable.rb:103:in `new'
     # ./lib/acts_as_unvlogable.rb:103:in `service_object'
     # ./lib/acts_as_unvlogable.rb:86:in `load_service'
     # ./lib/acts_as_unvlogable.rb:26:in `initialize'
     # ./spec/acts_as_unvlogable_spec.rb:49:in `new'
     # ./spec/acts_as_unvlogable_spec.rb:49:in `block (3 levels) in <top (required)>'
     # ./spec/acts_as_unvlogable_spec.rb:52:in `block (3 levels) in <top (required)>'

  4) UnvlogIt with a shortened youtube URL returns the video properties
     Failure/Error: let(:videotron) { UnvlogIt.new("http://youtu.be/4pzMBtPMUq8", {:key => "AIzaSyCWdV1zQpyD1X1OdheU6UqfV3JR6JQXY9A" }) } # => Keith Moon??s drum kit explodes
     ArgumentError:
       Unsuported url or service
     # ./lib/acts_as_unvlogable/vg_youtube.rb:20:in `rescue in initialize'
     # ./lib/acts_as_unvlogable/vg_youtube.rb:16:in `initialize'
     # ./lib/acts_as_unvlogable/vg_youtu.rb:9:in `initialize'
     # ./lib/acts_as_unvlogable.rb:103:in `new'
     # ./lib/acts_as_unvlogable.rb:103:in `service_object'
     # ./lib/acts_as_unvlogable.rb:86:in `load_service'
     # ./lib/acts_as_unvlogable.rb:26:in `initialize'
     # ./spec/acts_as_unvlogable_spec.rb:49:in `new'
     # ./spec/acts_as_unvlogable_spec.rb:49:in `block (3 levels) in <top (required)>'
     # ./spec/acts_as_unvlogable_spec.rb:348:in `check_video_attributes'
     # ./spec/acts_as_unvlogable_spec.rb:59:in `block (3 levels) in <top (required)>'

  5) UnvlogIt with an existent 'youtubed' metacafe url initialize a VgMetacafe instance
     Failure/Error: let(:videotron) { UnvlogIt.new("http://www.metacafe.com/watch/yt-r07zdVLOWBA/pop_rocks_and_coke_myth/", {:key => "AIzaSyCWdV1zQpyD1X1OdheU6UqfV3JR6JQXY9A" }) } # => Pop Rocks and Coke Myth
     ArgumentError:
       Unsuported url or service
     # ./lib/acts_as_unvlogable/vg_youtube.rb:20:in `rescue in initialize'
     # ./lib/acts_as_unvlogable/vg_youtube.rb:16:in `initialize'
     # ./lib/acts_as_unvlogable/vg_metacafe.rb:13:in `new'
     # ./lib/acts_as_unvlogable/vg_metacafe.rb:13:in `initialize'
     # ./lib/acts_as_unvlogable.rb:103:in `new'
     # ./lib/acts_as_unvlogable.rb:103:in `service_object'
     # ./lib/acts_as_unvlogable.rb:86:in `load_service'
     # ./lib/acts_as_unvlogable.rb:26:in `initialize'
     # ./spec/acts_as_unvlogable_spec.rb:84:in `new'
     # ./spec/acts_as_unvlogable_spec.rb:84:in `block (3 levels) in <top (required)>'
     # ./spec/acts_as_unvlogable_spec.rb:87:in `block (3 levels) in <top (required)>'

  6) UnvlogIt with an existent 'youtubed' metacafe url returns the video properties
     Failure/Error: let(:videotron) { UnvlogIt.new("http://www.metacafe.com/watch/yt-r07zdVLOWBA/pop_rocks_and_coke_myth/", {:key => "AIzaSyCWdV1zQpyD1X1OdheU6UqfV3JR6JQXY9A" }) } # => Pop Rocks and Coke Myth
     ArgumentError:
       Unsuported url or service
     # ./lib/acts_as_unvlogable/vg_youtube.rb:20:in `rescue in initialize'
     # ./lib/acts_as_unvlogable/vg_youtube.rb:16:in `initialize'
     # ./lib/acts_as_unvlogable/vg_metacafe.rb:13:in `new'
     # ./lib/acts_as_unvlogable/vg_metacafe.rb:13:in `initialize'
     # ./lib/acts_as_unvlogable.rb:103:in `new'
     # ./lib/acts_as_unvlogable.rb:103:in `service_object'
     # ./lib/acts_as_unvlogable.rb:86:in `load_service'
     # ./lib/acts_as_unvlogable.rb:26:in `initialize'
     # ./spec/acts_as_unvlogable_spec.rb:84:in `new'
     # ./spec/acts_as_unvlogable_spec.rb:84:in `block (3 levels) in <top (required)>'
     # ./spec/acts_as_unvlogable_spec.rb:348:in `check_video_attributes'
     # ./spec/acts_as_unvlogable_spec.rb:95:in `block (3 levels) in <top (required)>'

Finished in 43.19 seconds (files took 0.58128 seconds to load)
39 examples, 6 failures

Failed examples:

rspec ./spec/acts_as_unvlogable_spec.rb:24 # UnvlogIt with an existent youtube url initialize a VgYoutube instance
rspec ./spec/acts_as_unvlogable_spec.rb:31 # UnvlogIt with an existent youtube url returns the video properties
rspec ./spec/acts_as_unvlogable_spec.rb:51 # UnvlogIt with a shortened youtube URL initialize a VgYoutube instance
rspec ./spec/acts_as_unvlogable_spec.rb:58 # UnvlogIt with a shortened youtube URL returns the video properties
rspec ./spec/acts_as_unvlogable_spec.rb:86 # UnvlogIt with an existent 'youtubed' metacafe url initialize a VgMetacafe instance
rspec ./spec/acts_as_unvlogable_spec.rb:94 # UnvlogIt with an existent 'youtubed' metacafe url returns the video properties

Am I doing something wrongs?

It is not working with vimo

Hello

i have to used that for vimeo but when i am fetching imformation form vimo it is giving me error

videotron = UnvlogIt.new("http://vimeo.com/79794849")
ArgumentError: Unsuported url or service
from /home/cis/.rvm/gems/ruby-1.9.3-p374@linkmission/gems/acts_as_unvlogable-1.0.0/lib/acts_as_unvlogable.rb:26:in initialize' from (irb):15:innew'
from (irb):15
from /home/cis/.rvm/gems/ruby-1.9.3-p374@linkmission/gems/railties-3.1.12/lib/rails/commands/console.rb:45:in start' from /home/cis/.rvm/gems/ruby-1.9.3-p374@linkmission/gems/railties-3.1.12/lib/rails/commands/console.rb:8:instart'
from /home/cis/.rvm/gems/ruby-1.9.3-p374@linkmission/gems/railties-3.1.12/lib/rails/commands.rb:40:in <top (required)>' from script/rails:6:inrequire'
from script/rails:6:in `

'

invalid gem: package metadata is missing

Hello,

when I am trying to install acts_as_unvlogable gem I got the below error
invalid gem: package metadata is missing in /home/cis/.rvm/gems/ruby-2.1.1@linkmission_test/cache/youtube_it-2.1.1.gem

I am using ruby 2.1.1 version
and rails 4.1

Thumbnails from Dailymotion

There's a problem with Dailymotion thumbnails that i can't understand and obviously, don't know how to solve.

The thing is that Dailymotion's API returns invalid or malformed URL's for it's thumbnails.

This is an example for the same video.

Valid thumb URL grabbed from their own site: http://ak2.static.dailymotion.com/static/video/638/506/4605836:jpeg_preview_medium.jpg?20090109074910

Invalid thumb URL fetched through their API:
http://ak2.static.dailymotion.com/dyn/preview/160x120/4605836:jpeg_preview_large.jpg

I guess it's due to some kind of protection against mass thumbs grabbing.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.