Coder Social home page Coder Social logo

aidscrapper's Introduction

AIDScrapper

Based off a small script made by an Anonymous user. Now it's a full featured client which supports not only AID but also Holo. Alternatively, it can transform AID scenario objects in .scenario files for compatibility with the different AI Dynamic Storytelling platforms, specially NAI The json files can be transformed into .html for better readability although that's not the main purpose of this tool - you should upload it to one of the supported websites to use the stories.

Requirements

To install all requirements, use the following snippet after installing python on your machine.

pip install -r requirements.txt

Or just use:

pip install aids

Usage

To install the whole thing. You can manage it directly from console. Use:

aids help

Afterwards for a list of commands or:

aids-windows.bat help

If you use Windows.

You can also use the package directly via:

python3 -m aids help

Or in outside the package directory with:

python aids/manage.py help

Testing

If you feel like messing around with the code make sure none of the tests are failing using the test command. It uses pytest if you have it installed or unittest as a fallback.

aidscrapper's People

Contributors

moist-cat avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

aidscrapper's Issues

Does it also have the feature to Obfuscate AI dungeon datas?

I left my AI Dungeon account for a while and now i wanted to delete it, but i remember all the controversies too, so i wanted to delete it using this client. But i got concerned when i heard AIDcat is stopped its support, i knew i shouldn't trust Latitude with my data. Does this also have the feature to obfuscate AI dungeon data? thank you,

Can't Download Stories (Assertion Error: No result?)

I have already logged in my AIDungeon account via the 'python manage.py register' command; however, whenever I attempt to utilize the download commands, this happens (w/ redacted infomation):

C:\Users(username)>python manage.py stories -p aid
2022-02-05 21:17:51,347 [INFO] -- user_info.BaseClient: Aid successfully initialized.
2022-02-05 21:17:51,347 [INFO] -- user_info.BaseClient: Trying to log-in via file...
2022-02-05 21:17:51,582 [INFO] -- user_info.BaseClient: User "(name)" sucessfully logged into AID
2022-02-05 21:17:55,499 [INFO] -- user_info.BaseClient: Loaded story: "(Story 1)"
2022-02-05 21:17:55,600 [INFO] -- user_info.BaseClient: Loaded story: "(Story 2)"
2022-02-05 21:17:55,758 [INFO] -- user_info.BaseClient: Loaded story: "(Story 3)"
2022-02-05 21:17:55,758 [DEBUG] -- user_info.BaseClient: Got 3 stories so far
Traceback (most recent call last):
File "C:\Users(username)\manage.py", line 60, in
get_command()
File "C:\Users(username)\manage.py", line 48, in get_command
command(*required_args)
File "C:\Users(username)\AppData\Local\Programs\Python\Python310\lib\site-packages\aids\commands.py", line 40, in stories
self.get_stories()
File "C:\Users(username)\AppData\Local\Programs\Python\Python310\lib\site-packages\aids\app\client.py", line 227, in get_stories
assert result, "No result?"
AssertionError: No result?

This also happens with the 'all' command. It can find and name the stories but it just won't download them, even though I've tried over and over. Is there something I'm missing on my end?

AIDS Fails to Authenticate Despite Correct Credentials

Just downloaded the tool and tried to use it.

aids-windows.bat scenarios -p aid
2022-11-01 01:22:01,932 [INFO] -- user_info.BaseClient: Aid successfully initialized.
2022-11-01 01:22:01,933 [INFO] -- user_info.BaseClient: Trying to log-in via file...
2022-11-01 01:22:02,211 [ERROR] -- user_info.Session:
                    Server URL: https://api.aidungeon.io/graphql,
                    failed with status code (400).
                    Errors: [{'message': 'Context creation failed: Not authorized [Heimdall]. Not authorized', 'extensions': {'code': 'UNAUTHENTICATED'}}].
                    Raw response: b'{"errors":[{"message":"Context creation failed: No'
                    Request payload: {"variables": {"identifier": "MY CORRECT EMAIL APPEARED HERE", "email": "MY CORRECT EMAIL APPEARED HERE", "password": "MY CORRECT PASSWORD APPEARED HERE"}, "query": "\nmutation ($identifier: String, $email: String, $password: String, $anonymousId: String) {\n    login(identifier: $identifier, email: $email, password: $password, anonymousId: $anonymousId) {\n        accessToken\n    }\n}\n"}

Traceback (most recent call last):
  File "F:\x\games\aidungeon\venv\lib\site-packages\aids\app\client.py", line 29, in inner_func
    response.raise_for_status()
  File "F:\x\games\aidungeon\venv\lib\site-packages\requests\models.py", line 1021, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://api.aidungeon.io/graphql

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "F:\x\games\aidungeon\venv\Scripts\aids-windows.bat", line 4, in <module>
    get_command()
  File "F:\x\games\aidungeon\venv\lib\site-packages\aids\manage.py", line 41, in get_command
    platform = getattr(commands, cmd.platform)()
  File "F:\x\games\aidungeon\venv\lib\site-packages\aids\commands.py", line 34, in __init__
    self.login()
  File "F:\x\games\aidungeon\venv\lib\site-packages\aids\app\client.py", line 184, in login
    key = self.get_login_token(credentials)
  File "F:\x\games\aidungeon\venv\lib\site-packages\aids\app\client.py", line 282, in get_login_token
    res = self.session.post(self.url, data=json.dumps(self.aid_loginpayload)).json()
  File "F:\x\games\aidungeon\venv\lib\site-packages\requests\sessions.py", line 635, in post
    return self.request("POST", url, data=data, json=json, **kwargs)
  File "F:\x\games\aidungeon\venv\lib\site-packages\aids\app\client.py", line 65, in inner_func
    raise requests.exceptions.HTTPError from exc
requests.exceptions.HTTPError

Using Python 3.9.6 on Windows 10 Pro 21h2, with AIDS installed in a VENV.

Problem with downloading stories

Downloading stories from Ai Dungeon only downloads 25 stories when I have much more. These 25 stories seem to be the ones with the most actions. Using the -a command line argument doesn't change anything and using the -t command line argument loads stories but doesn't download them.

Installing requirements works fine, but...

pip install aids
WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip.
Please see pypa/pip#5599 for advice on fixing the underlying issue.
To avoid this problem you can invoke Python with '-m pip' instead of running pip directly.
ERROR: Could not find a version that satisfies the requirement aids (from versions: none)
ERROR: No matching distribution found for aids
WARNING: You are using pip version 21.1.1; however, version 22.0.4 is available.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.