Schengen-Borders-Information-Scraper


NameSchengen-Borders-Information-Scraper JSON
Version 0.0.1 PyPI version JSON
download
home_page
SummaryThis Python script scrapes information about temporary reintroduction of border control in the Schengen Area from the European Commission's website.
upload_time2023-09-22 10:57:55
maintainer
docs_urlNone
author
requires_python>=3.7
license
keywords
VCS
bugtrack_url
requirements beautifulsoup4 bs4 certifi charset-normalizer idna requests soupsieve urllib3
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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](https://home-affairs.ec.europa.eu/policies/schengen-borders-and-visa/schengen-area/temporary-reintroduction-border-control_en).

## Requirements

* Python 3.x
* `requests` library
* `BeautifulSoup` library

Make sure to install the required libraries using pip:

```bash
pip install requests beautifulsoup4
```

## Usage

Run the following command in bash to install this package with [pip](https://pypi.org/project/pip/)

### Installing the package

```bash
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

```python
import Schengen_Borders_Information_Scraper.scraper as scraper
```

### Available Functions

`get_countries()`

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

```python
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.

```python
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.

```python
country_info = scraper.get_country("Austria")
```

### Example Usage

```python
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:

```bash
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:

```bash
python -m venv venv
source ./bin/activate
```

#### Install Dependencies

Install all the required dependencies for the project using pip:

```bash
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!

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "Schengen-Borders-Information-Scraper",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "",
    "author": "",
    "author_email": "Markus Stuppnig <accounts@stuppnig.net>",
    "download_url": "https://files.pythonhosted.org/packages/96/c1/61d47277fe0f6beaccc4fd9fd7f14d34f481670e93484dec5b6a8e03eb55/schengen_borders_information_scraper-0.0.1.tar.gz",
    "platform": null,
    "description": "# Schengen Borders Information Scraper\n\nThis Python script scrapes information about temporary reintroduction of border control in the Schengen Area from the [European Commission's website](https://home-affairs.ec.europa.eu/policies/schengen-borders-and-visa/schengen-area/temporary-reintroduction-border-control_en).\n\n## Requirements\n\n* Python 3.x\n* `requests` library\n* `BeautifulSoup` library\n\nMake sure to install the required libraries using pip:\n\n```bash\npip install requests beautifulsoup4\n```\n\n## Usage\n\nRun the following command in bash to install this package with [pip](https://pypi.org/project/pip/)\n\n### Installing the package\n\n```bash\npip install Schengen_Borders_Information_Scraper\n```\n\nAfter installing the library, you can import the scraper module into your Python script and utilize the provided functions.\n\n### Importing the Module\n\n```python\nimport Schengen_Borders_Information_Scraper.scraper as scraper\n```\n\n### Available Functions\n\n`get_countries()`\n\nThis function retrieves a list of countries that have temporary border control.\n\n```python\ncountries = scraper.get_countries()\n```\n\n`get_temporary_borders()`\n\nGet 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.\n\n```python\nborders = scraper.get_temporary_borders()\n```\n\n`get_country(country)`\n\nRetrieve 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.\n\n```python\ncountry_info = scraper.get_country(\"Austria\")\n```\n\n### Example Usage\n\n```python\nimport Schengen_Borders_Information_Scraper.scraper as scraper\n\n# Get a list of countries with temporary border control\ncountries = scraper.get_countries()\nprint(countries)\n\nif 'Austria' in countries:\n    print(\"Austria has temporary border control.\")\nelse:\n    print(\"Austria does not have temporary border control.\")\n```\n\n## Developer Setup Guide\n\nWelcome to the Schengen Borders Information Scraper project! If you're a developer looking to contribute, follow these steps to set up your development environment.\n\n### Prerequisites\n\nBefore you begin, make sure you have the following:\n\n* Python installed (recommended version 3.x)\n* Git installed\n* PyCharm (recommended IDE, but any other IDE works too)\n\n#### Clone the Repository\n\nFirst, clone the project repository to your local machine:\n\n```bash\ngit clone git@github.com:Markus-Stuppnig/Schengen_Borders_Information_Scraper.git\ncd Schengen_Borders_Information_Scraper\n```\n\n#### Create a Virtual Environment\n\nIt's a good practice to work in a virtual environment to manage dependencies. Create and activate a virtual environment using the following commands:\n\n```bash\npython -m venv venv\nsource ./bin/activate\n```\n\n#### Install Dependencies\n\nInstall all the required dependencies for the project using pip:\n\n```bash\npip install -r requirements.txt\n```\n\nNow 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.\n\nHappy coding!\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "This Python script scrapes information about temporary reintroduction of border control in the Schengen Area from the European Commission's website.",
    "version": "0.0.1",
    "project_urls": {
        "Bug Tracker": "https://github.com/Markus-Stuppnig/Schengen-Borders-Information-Scraper/issues",
        "Homepage": "https://github.com/Markus-Stuppnig/Schengen-Borders-Information-Scraper"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9bf9b38e205493a4f1f21d85260f405f9d727619f4008239c603c70040eed4c7",
                "md5": "0f37001a47ba7d916f59613bf6107ee4",
                "sha256": "b3017ede72fd7cb1ea8d644e32495639e3b8330c34d0efee6bd79f92a2d37040"
            },
            "downloads": -1,
            "filename": "schengen_borders_information_scraper-0.0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "0f37001a47ba7d916f59613bf6107ee4",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 4296,
            "upload_time": "2023-09-22T10:57:53",
            "upload_time_iso_8601": "2023-09-22T10:57:53.295814Z",
            "url": "https://files.pythonhosted.org/packages/9b/f9/b38e205493a4f1f21d85260f405f9d727619f4008239c603c70040eed4c7/schengen_borders_information_scraper-0.0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "96c161d47277fe0f6beaccc4fd9fd7f14d34f481670e93484dec5b6a8e03eb55",
                "md5": "fde9e32916050868b9df4a58fa5c722f",
                "sha256": "051bcecc6ee4860805f7029fa35a067bc10ebe55db6113a4bb4189128426a02b"
            },
            "downloads": -1,
            "filename": "schengen_borders_information_scraper-0.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "fde9e32916050868b9df4a58fa5c722f",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 3276,
            "upload_time": "2023-09-22T10:57:55",
            "upload_time_iso_8601": "2023-09-22T10:57:55.275463Z",
            "url": "https://files.pythonhosted.org/packages/96/c1/61d47277fe0f6beaccc4fd9fd7f14d34f481670e93484dec5b6a8e03eb55/schengen_borders_information_scraper-0.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-09-22 10:57:55",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Markus-Stuppnig",
    "github_project": "Schengen-Borders-Information-Scraper",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "beautifulsoup4",
            "specs": [
                [
                    "==",
                    "4.12.2"
                ]
            ]
        },
        {
            "name": "bs4",
            "specs": [
                [
                    "==",
                    "0.0.1"
                ]
            ]
        },
        {
            "name": "certifi",
            "specs": [
                [
                    "==",
                    "2023.7.22"
                ]
            ]
        },
        {
            "name": "charset-normalizer",
            "specs": [
                [
                    "==",
                    "3.2.0"
                ]
            ]
        },
        {
            "name": "idna",
            "specs": [
                [
                    "==",
                    "3.4"
                ]
            ]
        },
        {
            "name": "requests",
            "specs": [
                [
                    "==",
                    "2.31.0"
                ]
            ]
        },
        {
            "name": "soupsieve",
            "specs": [
                [
                    "==",
                    "2.5"
                ]
            ]
        },
        {
            "name": "urllib3",
            "specs": [
                [
                    "==",
                    "2.0.5"
                ]
            ]
        }
    ],
    "lcname": "schengen-borders-information-scraper"
}
        
Elapsed time: 0.17435s