twist.moe icon indicating copy to clipboard operation
twist.moe copied to clipboard

Is the JSON file being updated

Open sagaya opened this issue 4 years ago • 16 comments

I saw the JSON file in the documentation https://raw.githubusercontent.com/phanirithvij/Myanimewebsite/master/twistlinks.json i just want to know if this file is being updated with the latest twist.moe anime's and episodes, this will be very useful.

sagaya avatar Sep 11 '19 22:09 sagaya

No it's not up to date. I lost the code to generate it. I keep forgetting about it. I will update it soon. Please remind me by adding a comment here when you read this.

phanirithvij avatar Sep 12 '19 00:09 phanirithvij

Okay, please update it thank you. Also if you could explain how you generated it, it will be so helpful

sagaya avatar Sep 12 '19 08:09 sagaya

Hi, please are don't forget to update the JSON file.

sagaya avatar Sep 15 '19 19:09 sagaya

I did it. Do a git pull and then,

python allanime.py filename.json # the filename to save

phanirithvij avatar Sep 16 '19 08:09 phanirithvij

Close this issue if it works.

phanirithvij avatar Sep 16 '19 08:09 phanirithvij

The format of the output json is different from the one in the REAMDE

sagaya avatar Sep 16 '19 09:09 sagaya

It will be really helpful if you can format it like the README one, i already started using it in a script and i have downloaded close to 1,000 animes don't want to have to start all over again.

sagaya avatar Sep 16 '19 10:09 sagaya

You can write a script to change the json to that format pretty easily.

On Mon, Sep 16, 2019, 3:47 PM Sagaya Abdulhafeez [email protected] wrote:

It will be really helpful if you can format it like the README one, i already started using it in a script and i have downloaded close to 1,000 animes don't want to have to start all over again.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/phanirithvij/twist.moe/issues/17?email_source=notifications&email_token=AHWUVSDBKYEIPSIK26Z7K5DQJ5MLHA5CNFSM4IVZLKR2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6YV77Q#issuecomment-531718142, or mute the thread https://github.com/notifications/unsubscribe-auth/AHWUVSD4NWFGIN6YN43W3EDQJ5MLHANCNFSM4IVZLKRQ .

phanirithvij2000 avatar Sep 16 '19 13:09 phanirithvij2000

Thank you.

sagaya avatar Sep 16 '19 14:09 sagaya

Sorry to bring this up on a closed thread, but I got this error when using python3 allanime.py filename.json

Reading from "data.json" and storing in "filename.json"
[>] Requesting Site
[*] Status Code:  200
[*] Content Length: 3415
Traceback (most recent call last):
  File "allanime.py", line 217, in <module>
    data = get_names_json(datafile)
  File "allanime.py", line 86, in get_names_json
    ret = {'total': len(ul), 'data': [], 'created': str(datetime.now())}
TypeError: object of type 'NoneType' has no len()

Any idea how to solve it?

vivian-ng avatar Jan 10 '21 13:01 vivian-ng

@vivian-ng I'm not in a place where there's a good network so I need some time to take a look at this. But I will. Please remind me in 2 days if possible.

phanirithvij avatar Jan 13 '21 05:01 phanirithvij

@phanirithvij Thanks for taking time to look into this issue.

vivian-ng avatar Jan 16 '21 16:01 vivian-ng

@phanirithvij python3 allanime.py filename.json still gives the same error, if you can share information on how the JSON file is requested and built, I can try to find out what is the problem.

vivian-ng avatar Jan 19 '21 00:01 vivian-ng

@vivian-ng sorry I forgot to reply here, check the new allanimenew.py file, but note that for now, it only fetches the anime info from their API link. ~Episode links are NOT queried.~ implemented

phanirithvij avatar Jan 24 '21 09:01 phanirithvij

@vivian-ng Also the json format is different from the previous version, and if you need backward compatibility like OP you can write a simple script to convert it.

phanirithvij avatar Jan 24 '21 10:01 phanirithvij

@phanirithvij Thank you for solving it. The script now uses the fixed output file new.json and new.min.json even if a filename is specified as an argument. But at least it can download the json file now. Hurray!

vivian-ng avatar Jan 24 '21 11:01 vivian-ng