{"id":35514402,"url":"https://github.com/adumbidiot/deviantart-rs","last_synced_at":"2026-01-03T22:04:17.287Z","repository":{"id":61842460,"uuid":"555687178","full_name":"adumbidiot/deviantart-rs","owner":"adumbidiot","description":"A Rust API for Deviantart","archived":false,"fork":false,"pushed_at":"2025-12-03T07:59:45.000Z","size":2301,"stargazers_count":7,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-06T08:36:40.585Z","etag":null,"topics":["deviantart","python","rust"],"latest_commit_sha":null,"homepage":"https://adumbidiot.github.io/deviantart-rs/deviantart/","language":"Rust","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/adumbidiot.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-10-22T04:48:25.000Z","updated_at":"2025-12-03T07:59:06.000Z","dependencies_parsed_at":"2024-03-11T00:22:19.617Z","dependency_job_id":"bfc2875c-c459-44f7-bb22-88f0a11ed1df","html_url":"https://github.com/adumbidiot/deviantart-rs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/adumbidiot/deviantart-rs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adumbidiot%2Fdeviantart-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adumbidiot%2Fdeviantart-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adumbidiot%2Fdeviantart-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adumbidiot%2Fdeviantart-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adumbidiot","download_url":"https://codeload.github.com/adumbidiot/deviantart-rs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adumbidiot%2Fdeviantart-rs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28194899,"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","status":"online","status_checked_at":"2026-01-03T02:00:06.471Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["deviantart","python","rust"],"created_at":"2026-01-03T22:03:26.439Z","updated_at":"2026-01-03T22:04:17.282Z","avatar_url":"https://github.com/adumbidiot.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# deviantart-rs\nA library to interact with https://deviantart.com.\nIt tries to uses scraping because the official API is useless.\nThis primarily implements deviation downloading, and some searching.\nIf you require uploading, please feel free to open an issue.\n\n## Examples\n\n### Login\nLogging in is not necessary to use this library. \nHowever, some content cannot be accessed without a login.\n```rust\n#[tokio::main]\nasync fn main() {\n    let client = deviantart::Client::new();\n\n    client\n        .login(\"username\", \"password\")\n        .await\n        .expect(\"failed to sign in\");\n}\n```\n\n## Python Binding\nThis repository also contains a Python binding.\nIt is a slightly higher-level API than the Rust library,\nso it may be easier to use.\n\n### Examples\n\n#### Download Deviation\n```python\nimport deviantart_py\nimport os\n\nclient = deviantart_py.Client()\n\n# Most deviations require a login to download,\n# even ones that aren't NSFW.\n# Make sure to provide one for the best results!\n\n# Here we load from environment variables.\n# You should set them to properly run this example.\n#\n# Look up what environment variables are if you are unfamiliar.\nusername = os.environ.get('USER')\npassword = os.environ.get('PASSWORD')\n\n# First, try to use our saved cookies to avoid logging in.\n# Spamming logins is a great way to get detected.\nif os.path.exists('cookies.json'):\n    print('Loading cookies...')\n    with open('cookies.json', 'r', encoding='utf-8') as cookies_file:\n        cookies = cookies_file.read()\n    client.load_cookies(cookies)\n\n# If the cookies didn't make us logged in, try a new login.\nif not client.is_logged_in() and username is not None and password is not None:\n    print('Logging in...')\n    client.login(username, password)\n    \n    # Save the cookies for next time.\n    print('Saving cookies...')\n    cookies = client.dump_cookies()\n    with open('cookies.json', 'w', encoding='utf-8') as cookies_file:\n        cookies_file.write(cookies)\n\ndeviation = client.get_deviation('https://www.deviantart.com/zilla774/art/chaos-gerbil-RAWR-119577071')\n\n# Keep in mind not all deviations can be downloaded.\n# Some don't provide a download url.\n#\n# We work around this by downloading the \"fullview\" instead,\n# an image generated by deviantart with reduced quality.\nif deviation.download_url is not None:\n    file_name = deviation.get_file_name(type='download')\n    deviation_bytes = client.download_deviation(deviation)\nelse:\n    file_name = deviation.get_file_name(type='fullview')\n    deviation_bytes = client.download_deviation(deviation, use_fullview=True)\n\nwith open(file_name, 'wb') as output_file:\n    output_file.write(deviation_bytes)\n```\n\n## Testing\nTests are run with `cargo test` from the top folder. \nIn order to run successfully, login credentials should be placed in a `config.json` file in the top folder with the following format:\n```json\n{\n    \"username\": \"USERNAME\",\n    \"password\": \"PASSWORD\"\n}\n```\nAlternatively, these credentials may be provided with the `DEVIANTART_RS_USERNAME` and `DEVIANTART_RS_PASSWORD` environment variables.\n\nCurrently, most online tests are gated behind the `--ignored` flag, as they fail on CI. \nIn order to run these tests, use `cargo test -- --ignored`.\n\n## Contributing\nThis project is currently mostly driven by personal need, but I would be glad to accept pull requests.\nFeel free to open an issue or pull request if you feel something should be changed or upgraded.\nBefore opening a PR, ensure `cargo test -- --ignored` runs without error after making your changes locally on your machine,\nas CI is incapable of running these tests.\n\n## References\n * https://www.deviantart.com/developers/\n * https://github.com/wix-incubator/DeviantArt-API/issues/153\n * https://github.com/mikf/gallery-dl","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadumbidiot%2Fdeviantart-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadumbidiot%2Fdeviantart-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadumbidiot%2Fdeviantart-rs/lists"}