{"id":22191282,"url":"https://github.com/dunderrrrrr/pyvanza","last_synced_at":"2026-04-09T11:42:30.794Z","repository":{"id":189505211,"uuid":"452804865","full_name":"dunderrrrrr/pyvanza","owner":"dunderrrrrr","description":"Fetch fund data from Avanza using Python   :moneybag:","archived":false,"fork":false,"pushed_at":"2022-01-27T18:50:18.000Z","size":4,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-30T01:15:39.089Z","etag":null,"topics":["avanza","beautiful","beautifulsoup4","chromium","colorful","fund","json","python","pyvanza","raspberrpi","selenium","tables","terminal","webdriver"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dunderrrrrr.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2022-01-27T18:49:12.000Z","updated_at":"2024-05-18T08:25:30.000Z","dependencies_parsed_at":"2023-08-20T14:54:22.583Z","dependency_job_id":null,"html_url":"https://github.com/dunderrrrrr/pyvanza","commit_stats":null,"previous_names":["dunderrrrrr/pyvanza"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dunderrrrrr%2Fpyvanza","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dunderrrrrr%2Fpyvanza/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dunderrrrrr%2Fpyvanza/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dunderrrrrr%2Fpyvanza/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dunderrrrrr","download_url":"https://codeload.github.com/dunderrrrrr/pyvanza/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245351760,"owners_count":20601088,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["avanza","beautiful","beautifulsoup4","chromium","colorful","fund","json","python","pyvanza","raspberrpi","selenium","tables","terminal","webdriver"],"created_at":"2024-12-02T12:15:16.526Z","updated_at":"2025-12-30T23:26:48.070Z","avatar_url":"https://github.com/dunderrrrrr.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Py(A)vanza\n\nFetch fund data from [avanza.se](https://avanza.se/) using Python and some web scraping with bs4.  The default way is to display the data in the terminal, apply `--json` for json output.\n\n![Tux, the Linux mascot](https://i.imgur.com/g7bMnFa.png)\n\n### How does it work?\n\nProvide this script with the `fund id` (can be found in the url of the fund, example below). The script is scraping the funds page and displays the output.\n\n### How is this useful?\n\nYou can use this data for your own project, perhaps on a Raspberry Pi with a display?\n\n### Installation\n\nWe're going to use selenium with chrome driver for this one. So apt install `chromium-chromedriver` and `xvfb`.\n```\n$ sudo apt install chromium-chromedriver\n$ sudo apt install xvfb\n```\n\nNext, clone repo and install requirements (preferably inside a virtualenv of some sort).\n```\n$ git clone \u003curl\u003e\n$ mkvirtualenv pyvanza\n$ pip install -r requirements.txt\n```\nGrab the `fund id` from url. In this case the id is `325406`.  \n\n**URL:** https://www.avanza.se/fonder/om-fonden.html/325406/spiltan-aktiefond-investmentbolag  \n\n### Running script\n\n| Argument | Required |  Description  |  \n|---|---|---|\n| `id`  | Yes  | Fund id is mandatory  |\n| `--json`  | No  | Output will be in json format  |\n| `--nocolors`  | No  | Terminal colors will be disabled  |\n\n```\n(pyvanza) user@host:~ $ python pyvanza.py 693994\n┌──────────────────────────────────────┐\n│  Spiltan Globalfond Investmentbolag  │\n└──────────────────────────────────────┘\n┌──────┬─────────┐\n│ Time │ Change  │\n├──────┼─────────┤\n│ 1 m. │ −2,82%  │\n│ 3 m. │ +1,54%  │\n│ i år │ −3,84%  │\n│ 1 år │ +26,21% │\n│ 3 år │ +55,97% │\n│ 5 år │ +70,65% │\n│ Max  │ +87,05% │\n└──────┴─────────┘\n```\n```\n(pyvanza) user@host:~ $ python pyvanza.py 693994\n{\n  'title': ' Spiltan Globalfond Investmentbolag ',\n  'data': {\n     '1 m.': '−2,82%',\n     '3 m.': '+1,54%',\n     'i år': '−3,84%',\n     '1 år': '+26,21%',\n     '3 år': '+55,97%',\n     '5 år': '+70,65%',\n     'Max': '+87,05%'\n }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdunderrrrrr%2Fpyvanza","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdunderrrrrr%2Fpyvanza","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdunderrrrrr%2Fpyvanza/lists"}