Coder Social home page Coder Social logo

ufo-poems's Introduction

This is a project for NaNoGenMo. The idea is to scrape UFO sightings and turn the reports into poems

Getting UFO Data

Scrape responsibly, see https://www.scrapehero.com/how-to-prevent-getting-blacklisted-while-scraping/#easiest-way-to-find-if-a-site-doesnt-want-data-to-be-scraped

I'm using http://ufostalker.com to get the data, mainly because the reports are much more interesting than official sightings.

Running

First run pipenv isntall and pipenv shell to start the environment.

python main.py will start the scraping.

Proxies

Proxies are generated via proxies = gen_proxies. This will populate a text file with a list of I.P addresses to use.

Pool

Pool is set to 10: with Pool(10) as p: which means 10 requests. This can be increased or decreased. But be nice and don't actually DoS a site. ❤️

Writing the poems

Once the database is populated, run python writer.py this will generate a ufo_poems.md file. There are over 90,000 sightings so for efficiency I'm just using the latest 4000 (which will equate to > 50,000 words in total) e.g data = get_data()[:4000]. To get all the sightings, just remove the slice.

Example of poems: ufo_poems.md

ufo-poems's People

Contributors

dependabot[bot] avatar kevinhowbrook avatar

Stargazers

 avatar

Watchers

 avatar

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.