Comments (14)
That's odd. Are you using the scraper or the API?
Are you sure you're using 2.5.0? Try this and see if it helps:
gem uninstall video_info
bundle clean
bundle install
from video_info.
I uninstalled all versions of video_info, cleaned, and reinstalled. It doesn't seem to have changed anything. I am pretty sure I am using the API. My code is as follows:
VideoInfo.provider_api_keys = { youtube: '<MYKEY>' }
begin
video = VideoInfo.new(url)
rescue
errors.add(:url, "URL link is not valid")
return
end
puts(video.available?)
if !video.available?
begin
self.title = video.title.to_s
puts("Video ID: " + video.video_id.to_s)
puts("Provider: " + video.provider.to_s)
puts("Title: " + video.title.to_s) # Not working
puts("Description: " + video.description.to_s) # Not working
puts("Duration: " + video.duration.to_s) # Not working
puts("Date: " + video.date.to_s) # Not working
puts("Small thumbnail: " + video.thumbnail_small.to_s)
puts("Medium thumbnail: " + video.thumbnail_medium.to_s)
puts("Large thumbnail: " + video.thumbnail_large.to_s)
puts(video.embed_url)
puts(video.embed_code)
puts(video.embed_url)
self.image_url = video.thumbnail_small
rescue
errors.add(:url, "Error loading URL data")
return
end
else
errors.add(:url, "Video link is not valid")
end
from video_info.
Can you try it with the scraper? To use the scraper, just delete the first line VideoInfo.provider_api_keys = { youtube: '<MYKEY>' }
I just tried it with the scraper and it worked fine:
2.2.2 :003 > a = VideoInfo.new('https://www.youtube.com/watch?v=BwSoPjRhJpc')
=> #<VideoInfo:0x00000001a67308 @provider=#<VideoInfo::Providers::Youtube:0x00000001a66a70 @options={"User-Agent"=>"VideoInfo/2.5.0"}, @url="https://www.youtube.com/watch?v=BwSoPjRhJpc", @video_id="BwSoPjRhJpc">>
2.2.2 :004 > a.duration
=> 1835
2.2.2 :005 > a = VideoInfo.new('https://www.youtube.com/watch?v=cxk-cs6n_K0')
=> #<VideoInfo:0x000000008d37e0 @provider=#<VideoInfo::Providers::Youtube:0x000000008d1850 @options={"User-Agent"=>"VideoInfo/2.5.0"}, @url="https://www.youtube.com/watch?v=cxk-cs6n_K0", @video_id="cxk-cs6n_K0">>
2.2.2 :006 > a.duration
=> 11
2.2.2 :007 > a.date
=> 2013-11-30 00:00:00 -0800
2.2.2 :008 > a.title
=> "shoegaze.mov"
2.2.2 :009 > a.description
=> "[vacuuming intensifies]"
from video_info.
Deleting the first line gives me the following error:
SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed
Is this related?
from video_info.
The SSL error only happens when I try to pull available, date, duration, title, and description (same as API).
from video_info.
Huh, this is very odd.
Could you try cloning this repository, running rspec, and seeing if the tests pass?
from video_info.
Assuming I did this right I got 366 examples, 96 failures, 1 pending. What information would be beneficial?
from video_info.
It looks like this error is consistent:
OpenSSL::SSL::SSLError:
SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed
from video_info.
Assuming I did this right I got 366 examples, 96 failures, 1 pending. What information would be beneficial?
The tests all pass on my machine, Travis-CI, and other people's machines, so the issue seems to be unique to your PC. So I don't think I'll be able to reproduce it.
It looks like your issue has been discussed here: http://stackoverflow.com/questions/4528101/ssl-connect-returned-1-errno-0-state-sslv3-read-server-certificate-b-certificat
Have you looked into any of the solutions posted there?
from video_info.
I tried a few simple solutions. I'll give it some more solid effort later today.
from video_info.
I've tried updating openssl on my computer, adding certs, removing and reinstalling gems, and so on, but nothing seems to work. In the end I think it could likely be because I am coding on a Windows machine.
But after making all these changes on my local machine I re-deployed and looks the like gem is working exactly as expected on my live site!
from video_info.
Cool. Sorry it won't work on your Windows machine. Since the issue appears to be outside the scope of video_info, I'm closing this issue.
from video_info.
With the same problem, and I'm using mac, could you help me?
from video_info.
@YXsagittarius StackOverflow would probably be a better place to ask.
from video_info.
Related Issues (20)
- YouTube Avaible Status HOT 7
- unexpected network error while fetching information about the video HOT 5
- Include response code in unexpected network error message
- Allow end users to modify the JSON filter in Vimeo
- How can get likes and comments and uploaded_at for youtube video? HOT 2
- NoMethodError with Youtube Scraper when the video has no description HOT 1
- How do you access the width of youtube thumbnails? HOT 2
- Warnings in 2.5.1 HOT 2
- Instagram support HOT 3
- Update oga gem dependency to version 3.0 HOT 3
- Exposing more video statistics HOT 4
- Calling author_url twice errors out HOT 1
- YouTube provider does not fetch standard HOT 4
- YouTube - Title & Description Scrape Error HOT 4
- Cant fetch thumbnails HOT 9
- Improve performance of usable? helper HOT 5
- valid_url returns true with user page HOT 2
- LINK_API_KEY & VOZ_API_KEY usage HOT 2
- Vimeo Scraper: interactionStatistic can be missing HOT 2
- Support for Youtube Shorts HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from video_info.