Security News
38% of CISOs Fear They’re Not Moving Fast Enough on AI
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
movie-script-scraper
Advanced tools
A simple scraper to retrieve movie scripts by genre or title from IMSDB.
A simple scraper to retrieve movie scripts by genre or title from IMSDB.
$ npm install -S movie-script-scraper
Movie Script Scraper exposes a function; simply pass this function the options (see below), and it will return a promise with an array of the file paths of the scripts it saved.
const mss = require('movie-script-scraper');
const options = {
genre: 'Action',
total: 10,
};
mss(options)
.then(filePaths => {
console.log(filePaths);
})
.catch(err => {
console.error('There was a problem');
});
genre
[string] - Any valid film genre, a complete list can be found here.
total
[number] - the total number of scripts you want from a given genre.
title
[string] - The name of the film's script you want.dest
[string] - Location that you want to save your scripts.
You can run MSS directly from the CLI (if it's globally available in your PATH, e.g. by npm install -g mss
) with variety of useful options.
$ movie-script-scraper --total 10 --genre Comedy
or enter a title:
$ movie-script-scraper --title 'american sniper'
Conveniently IMSDB provides RSS feeds based on movie genre (ex. http://www.imsdb.com/feeds/genre.php?genre=Comedy). Using the awesome fetch module we are then able to grab that page and use a regular expression to generate an array of movie script URLs. We then visit each URL with Fetch and use another awesome module called Cheerio to select just the movie script from each page and finally output each script to a file.
$ npm install
$ npm test
Don't hesitate to create a pull request. Every contribution is appreciated. In development you can start the tests by calling npm test
. Checkout our contribution README for more info.
git checkout -b my-new-feature
git commit -am 'Add some feature'
git push origin my-new-feature
Joe Karlsson |
FAQs
A simple scraper to retrieve movie scripts by genre or title from IMSDB.
The npm package movie-script-scraper receives a total of 0 weekly downloads. As such, movie-script-scraper popularity was classified as not popular.
We found that movie-script-scraper demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.
Security News
Company News
Socket is joining TC54 to help develop standards for software supply chain security, contributing to the evolution of SBOMs, CycloneDX, and Package URL specifications.