Giter Club home page Giter Club logo

daily-pennsylvanian-headline-scraper's Introduction

daily-pennsylvanian-headline-scraper

This repository is a simple scraper intended to scrape data from the daily pennsylvanian. This was done for Homework 2 of CIS 3500 at Penn

Changes Made

We've updated our web scraping script to enhance its functionality and adapt to a new use case. Originally, the scraper was designed to fetch the main headline from The Daily Pennsylvanian home page. The modification shifts the focus to the "Crosswords" section, specifically aiming to retrieve the title of the latest crossword puzzle. Below, we outline the changes made and explain the rationale behind these adjustments.

The scraper's target has been changed from the main headline to the latest entry in the "Crosswords" section. This was done to align with the new objective of providing users with the most recent crossword puzzle information.

Instead of fetching an <a> tag with a specific class from the homepage, the updated scraper first locates the most recent crossword article by finding a div with the class row section-article. This change was necessary as the structure of the crossword page organizes articles within these div elements, differing from the homepage structure.

After identifying the latest crossword entry, the script now looks for an <h3> tag with the class standard-link within this entry to find the title of the crossword. The assumption here is that the latest crossword's title is encapsulated within this specific tag, following the website's consistent layout for article titles.

The decision to focus on the "Crosswords" section stemmed from a desire to provide users with culturally engaging content that is updated regularly. The methodological adjustments, such as targeting specific HTML elements and adding safety checks, were made to ensure the scraper remains robust against web page structural changes and provides accurate data.

daily-pennsylvanian-headline-scraper's People

Contributors

github-actions[bot] avatar judahnour 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.