Code Monkey home page Code Monkey logo

thedparchives's Introduction

The DP Archives

This tool allows you to scrape all the articles made available through the Daily Pennsylvanian Archives

Installation

Clone the repo into your local folder:

git clone https://github.com/joelslee/thedparchives

Running is simple and at this point will download every issue from 1885 to 2002.

python webscraper.py

Between 1885 to 2002, there are around 16,000 articles, amounting to a little over 1 GB of .txt files. Towards that end, the scraping takes awhile, and you likely will be "timed out" by the dp archives' API. When the script is running, you will see a count being printed to your console. If you get timed out, simply add the last count that you got to the end of the script.

python webscraper.py 7433

The .txt files will be downloaded directly to the directory you are in, and will be of the format tdpYEARMONTHDAY-01.txt, for example: tdp19341128-01.txt is the issue for November 28th, 1934.

To Do list

  • Be able to add flags to only scrape articles from certain dates
  • Automatically catch timeout and wait with a timer, and then start again.

About the project

the dp archives web scraper was created for the final project for the class, Introduction to Digital Humanities taught by Scott Enderle in Spring 2019. The topic modeling tool was used on all of the issues scraped by this project. The early code for this was written in a jupyter notebook. After completion of the project, I decided to make it a python executable script for those who want to scrape the daily pennsylvanian archives for themselves.

Special thanks go to Matthew Pilecki and Jessica Dummer from Penn Libraries, Stefan Boddie from Veridian Software for helping me with the API, and Scott Enderle for oversight for the project.

thedparchives's People

Contributors

joelsjlee 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.