Wired tech news extractor avatar

Wired tech news extractor

Pricing

from $5.00 / 1,000 articles

Go to Apify Store
Wired tech news extractor

Wired tech news extractor

Actor scrapes and summarizes tech news from wired.com

Pricing

from $5.00 / 1,000 articles

Rating

0.0

(0)

Developer

Jan Kirchner

Jan Kirchner

Maintained by Community

Actor stats

0

Bookmarked

3

Total users

1

Monthly active users

18 days ago

Last modified

Categories

Share

Python Crawlee & BeautifulSoup Actor Template

This template example was built with Crawlee for Python to scrape data from a website using Beautiful Soup wrapped into BeautifulSoupCrawler.

Quick Start

Once you've installed the dependencies, start the Actor:

$apify run

Once your Actor is ready, you can push it to the Apify Console:

apify login # first, you need to log in if you haven't already done so
apify push

Project Structure

.actor/
├── actor.json # Actor config: name, version, env vars, runtime settings
├── dataset_schena.json # Structure and representation of data produced by an Actor
├── input_schema.json # Input validation & Console form definition
└── output_schema.json # Specifies where an Actor stores its output
src/
└── main.py # Actor entry point and orchestrator
storage/ # Local storage (mirrors Cloud during development)
├── datasets/ # Output items (JSON objects)
├── key_value_stores/ # Files, config, INPUT
└── request_queues/ # Pending crawl requests
Dockerfile # Container image definition

For more information, see the Actor definition documentation.

How it works

This code is a Python script that uses BeautifulSoup to scrape data from a website. It then stores the website titles in a dataset.

  • The crawler starts with URLs provided from the input startUrls field defined by the input schema. Number of scraped pages is limited by maxPagesPerCrawl field from the input schema.
  • The crawler uses requestHandler for each URL to extract the data from the page with the BeautifulSoup library and to save the title and URL of each page to the dataset. It also logs out each result that is being saved.

What's included

Resources

Creating Actors with templates