GithubHelp home page GithubHelp logo

imdb's People

Contributors

alecrajeev avatar amilajack avatar danwakeem avatar ebouther avatar flakolefluk avatar mhsjlw avatar patrickspemann avatar thanosdi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

imdb's Issues

Package doesn't seem to be working anymore

Hello,

I used this package a few months ago with success; I recently came back to it, and I don't seem to be receiving any results anymore from it. I would always get the following:

{
  title: 'N/A',
  year: 'N/A',
  contentRating: 'N/A',
  runtime: 'N/A',
  description: '',
  rating: 'N/A',
  poster: 'N/A',
  genre: [ 'N/A' ],
  director: 'N/A',
  metascore: 'N/A',
  writer: 'N/A'
}

Not sure what's not working; but the module seems to be looking for a title-overview-widget node that doesn't exist on the returned page. Might it be that the imdb page format changed?

Cheers
Joel

Rewrite

The current API and internal API is completely awful

Quotes

Hi,
I really have enjoyed playing around this nodejs module, very good work i like cheeriojs a lot.
So, i have just added quotes.js if you can tell me if you have an idea on how is it possible to keep working with regexp instead of what i've added in the cases of imdb.js

No Access Control Allow Origin

Hey, I just tried this...

//url is like this: http://www.imdb.com/title/tt0468569/

const url = e.target.href
const imdbRegex = new RegExp("tt\\d{7}", "g")
const imdbId = url.match( imdbRegex )

//console.log(imdbId[0]) I get the correct ID

imdb(imdbId[0], (err, data) => {
	if (err)
	    console.log(err.stack);

	if (data)
	     console.log(data);
});

Response:

Failed to load http://www.imdb.com/title/tt0468569/: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://mysite.dev' is therefore not allowed access. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

Any idea what how can I fix this?

I have tried adding this on .htaccess but not working
Header set Access-Control-Allow-Origin "*"

Running README Example Fails

When I try and run the readme example

var imdb = require('imdb');

imdb('tt3659388', function(err, data) {
    if(err)
        throw err;

    console.log(data);
});

I get the following error

D:\Documents\GitHub\imdb\node_modules\imdb\lib\imdb.js:14
            var year = body.match(/<span class="nobr">\(<a href="\/year\/\d+\/\?ref_=tt_ov_inf">(\d+)<\/a>\)<\/span>/i)[1];
                                                                                                                       ^

TypeError: Cannot read property '1' of null
    at Request._callback (D:\Documents\GitHub\imdb\node_modules\imdb\lib\imdb.js:14:120)
    at Request.self.callback (D:\Documents\GitHub\imdb\node_modules\imdb\node_modules\request\request.js:199:22)
    at emitTwo (events.js:87:13)
    at Request.emit (events.js:172:7)
    at Request.<anonymous> (D:\Documents\GitHub\imdb\node_modules\imdb\node_modules\request\request.js:1036:10)
    at emitOne (events.js:82:20)
    at Request.emit (events.js:169:7)
    at IncomingMessage.<anonymous> (D:\Documents\GitHub\imdb\node_modules\imdb\node_modules\request\request.js:963:12)
    at emitNone (events.js:72:20)
    at IncomingMessage.emit (events.js:166:7)
 Program node app.js -dev exited with code 1

2.0

Under going a massive change, going to mark it as 2.0, includes:

  • Rewrite in TypeScript
  • Modern JavaScript (promises, import statements, async/await)
  • Internal API changes

Track the progress at the typescript branch. Help is appreciated

Title in local language

Currently i found that gives me title in local language

<h1 itemprop="name" class="">Тихоокеанський рубiж: Повстання&nbsp;<span id="titleYear">(<a href="/year/2018/?ref_=tt_ov_inf"
>2018</a>)</span>            </h1>
                <div class="originalTitle">Pacific Rim: Uprising<span class="description"> (original title)</span></div>

May be there some url param which should give in english or we can add if condition

Caching

Is this a feature that people would be interested in?

Promise-based API

Out with the callbacks, in with the promises. Requires a massive API overhaul as well, possibly to make it less stringly-typed

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.