Skip to content
This repository has been archived by the owner on Sep 30, 2023. It is now read-only.

Is the JSON file being updated #17

Open
sagaya opened this issue Sep 11, 2019 · 16 comments
Open

Is the JSON file being updated #17

sagaya opened this issue Sep 11, 2019 · 16 comments

Comments

@sagaya
Copy link

sagaya commented Sep 11, 2019

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.

@phanirithvij
Copy link
Owner

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.

@sagaya
Copy link
Author

sagaya commented Sep 12, 2019

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

@sagaya
Copy link
Author

sagaya commented Sep 15, 2019

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

@phanirithvij
Copy link
Owner

I did it.
Do a git pull and then,

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

@phanirithvij
Copy link
Owner

Close this issue if it works.

@sagaya
Copy link
Author

sagaya commented Sep 16, 2019

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

@sagaya
Copy link
Author

sagaya commented Sep 16, 2019

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.

@phanirithvij2000
Copy link
Contributor

phanirithvij2000 commented Sep 16, 2019 via email

@sagaya
Copy link
Author

sagaya commented Sep 16, 2019

Thank you.

@vivian-ng
Copy link
Contributor

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?

@phanirithvij phanirithvij reopened this Jan 13, 2021
@phanirithvij
Copy link
Owner

@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.

@vivian-ng
Copy link
Contributor

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

@vivian-ng
Copy link
Contributor

@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.

@phanirithvij
Copy link
Owner

phanirithvij commented Jan 24, 2021

@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
Copy link
Owner

@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.

@vivian-ng
Copy link
Contributor

@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!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants