Skip to main content

Schengen Borders Information Scraper

This Python script scrapes information about temporary reintroduction of border control in the Schengen Area from the European Commission's website.

Requirements

  • Python 3.x
  • requests library
  • BeautifulSoup library

Make sure to install the required libraries using pip:

pip install requests beautifulsoup4

Usage

Run the following command in bash to install this package with pip

Installing the package

pip install Schengen_Borders_Information_Scraper

After installing the library, you can import the scraper module into your Python script and utilize the provided functions.

Importing the Module

import Schengen_Borders_Information_Scraper.scraper as scraper

Available Functions

get_countries()

This function retrieves a list of countries that have temporary border control.

countries = scraper.get_countries()

get_temporary_borders()

Get information about temporary border controls for all countries. It returns a dictionary with country names as keys and information about the start date, end date, and reason for the border control as values.

borders = scraper.get_temporary_borders()

get_country(country)

Retrieve information about the temporary border control of a specific country. It returns a dictionary with information about the start date, end date, and reason for the border control.

country_info = scraper.get_country("Austria")

Example Usage

import Schengen_Borders_Information_Scraper.scraper as scraper

# Get a list of countries with temporary border control
countries = scraper.get_countries()
print(countries)

if 'Austria' in countries:
    print("Austria has temporary border control.")
else:
    print("Austria does not have temporary border control.")

Developer Setup Guide

Welcome to the Schengen Borders Information Scraper project! If you're a developer looking to contribute, follow these steps to set up your development environment.

Prerequisites

Before you begin, make sure you have the following:

  • Python installed (recommended version 3.x)
  • Git installed
  • PyCharm (recommended IDE, but any other IDE works too)

Clone the Repository

First, clone the project repository to your local machine:

git clone git@github.com:Markus-Stuppnig/Schengen_Borders_Information_Scraper.git
cd Schengen_Borders_Information_Scraper

Create a Virtual Environment

It's a good practice to work in a virtual environment to manage dependencies. Create and activate a virtual environment using the following commands:

python -m venv venv
source ./bin/activate

Install Dependencies

Install all the required dependencies for the project using pip:

pip install -r requirements.txt

Now you have your development environment set up and ready to go! You can use your preferred IDE (such as PyCharm) to work on the project. Be sure to add any IDE-specific configuration files to the .gitignore if you choose an alternative IDE.

Happy coding!

Metadata

Release files for Schengen-Borders-Information-Scraper 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for Schengen-Borders-Information-Scraper 0.0.1
File Size Uploaded
schengen_borders_information_scraper-0.0.1.tar.gz 3.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for Schengen-Borders-Information-Scraper 0.0.1
File Interpreter ABI Platform
schengen_borders_information_scraper-0.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 7.6 kB

Release files / schengen_borders_information_scraper-0.0.1.tar.gz

Download URL schengen_borders_information_scraper-0.0.1.tar.gz
Size 3.3 kB
Tags Source
SHA-256 checksum
How to use checksums
051bcecc6ee4860805f7029fa35a067bc10ebe55db6113a4bb4189128426a02b
BLAKE2b-256 checksum
How to use checksums
96c161d47277fe0f6beaccc4fd9fd7f14d34f481670e93484dec5b6a8e03eb55
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.5

Release files / schengen_borders_information_scraper-0.0.1-py3-none-any.whl

Download URL schengen_borders_information_scraper-0.0.1-py3-none-any.whl
Size 4.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b3017ede72fd7cb1ea8d644e32495639e3b8330c34d0efee6bd79f92a2d37040
BLAKE2b-256 checksum
How to use checksums
9bf9b38e205493a4f1f21d85260f405f9d727619f4008239c603c70040eed4c7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.5

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page