Python Tool for Scraping SWIFT/BIC codes
This code scraps public available SWIFT codes and its metadata from theswiftcodes.com.
To get a local copy up and running follow these simple steps.
In your terminal, change the current working directory to the location where you want the cloned directory.
As shown below, type git clone in the terminal, paste the Github repository URL, and press “enter” to create your local clone.
git clone https://github.com/Tax-Justice-Network/swift_codes_scraper.git
conda env create -f environment.yml
conda activate swift_codes_scraper
After running the code above in Terminal, you still have to select the environment in VSCode. Click F1
, select Python: Select Interpreter
, click Enter
and select the one that has swift_codes_scraper
in brackets. If you don't see the environment in the list, reload VS Code.
To scrape SWIFT data automatically, without interaction, you can issue (launch with --help
for a detailed explanation of each argument)
python ./src/swift_scrapper.py --full_bank_info --output_path ../data/final/swifts.jsonl
The project is composed of a main notebook named swift_scraper.py.
This is the project structure followed by this project:
├── LICENSE
├── README.md <- The top-level README for developers using this project
├── data
│ ├── final <- Final data and results
│ ├── processed <- Intermediate datasets
│ └── raw <- The original, immutable data dump
│
├── docs <- Documents of interest for this project
│
├── src <- Source code as Jupyter notebooks and main scripts.
│
├── environment.yml <- YAML file to create conda environment to run the project