Giter Site home page Giter Site logo

chat_noir's Introduction

ChatNoir

Installation

Add this line to your application's Gemfile:

gem 'chat_noir'

And then execute:

$ bundle

Or install it yourself as:

$ gem install chat_noir

Usage

The gem as easy as pie:

  url = "https://www.castupload.com/actors/adrian-topol"
  ChatNoir.copyright(url)

done ๐Ÿง

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake spec to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/denkungsart/chat_noir.

chat_noir's People

Contributors

shiroginne avatar andreas-venturini avatar fschwahn avatar

Watchers

 avatar  avatar James Cloos avatar David Zitzlsperger avatar Denkungsart Bot avatar  avatar

chat_noir's Issues

http://www.sueddeutsche.de/ is not compatible with Ruby NET HTTP

2.3.1 :005 > require 'open-uri'
 => true 
2.3.1 :006 > open 'http://www.sueddeutsche.de/politik/ukip-nach-dem-brexit-farage-drueckt-sich-vor-der-verantwortung-1.3062729'
Zlib::DataError: incorrect header check
    from /Users/xxxx/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/net/http/response.rb:380:in `inflate'
    from /Users/xxxx/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/net/http/response.rb:380:in `block in inflate_adapter'
    from /Users/xxxx/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/net/protocol.rb:411:in `call_block'
    from /Users/xxxx/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/net/protocol.rb:402:in `<<'
    from /Users/xxxx/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/net/protocol.rb:104:in `read'
    from /Users/xxxx/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/net/http/response.rb:402:in `read'
    from /Users/xxxx/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/net/http/response.rb:291:in `block in read_body_0'
    from /Users/xxxx/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/net/http/response.rb:262:in `inflater'
    from /Users/xxxx/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/net/http/response.rb:281:in `read_body_0'
    from /Users/xxxx/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/net/http/response.rb:202:in `read_body'
    from /Users/xxxx/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/open-uri.rb:334:in `block (2 levels) in open_http'
    from /Users/xxxx/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/net/http.rb:1446:in `block in transport_request'
    from /Users/xxxx/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/net/http/response.rb:163:in `reading_body'
    from /Users/xxxx/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/net/http.rb:1445:in `transport_request'
    from /Users/xxxx/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/net/http.rb:1407:in `request'
    from /Users/xxxx/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/open-uri.rb:325:in `block in open_http'
    from /Users/xxxx/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/net/http.rb:853:in `start'
    from /Users/xxxx/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/open-uri.rb:319:in `open_http'
    from /Users/xxxx/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/open-uri.rb:737:in `buffer_open'
    from /Users/xxxx/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/open-uri.rb:212:in `block in open_loop'
    from /Users/xxxx/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/open-uri.rb:210:in `catch'
    from /Users/xxxx/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/open-uri.rb:210:in `open_loop'
    from /Users/xxxx/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/open-uri.rb:151:in `open_uri'
    from /Users/xxxx/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/open-uri.rb:717:in `open'
    from /Users/xxxx/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/open-uri.rb:35:in `open'
    from (irb):6
    from /Users/xxxx/.rvm/rubies/ruby-2.3.1/bin/irb:11:in `<main>'
2.3.1 :007 > 

Unexpected copyright text for images

On Castupload I worked with the blog (post from link). When I paste a link from an actor profile, the copyright text below the picture contains the address of the agency. So it seems like there is taken some random content from the page. Maybe we should return just nil when no copyright information is found.

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.