Git Product home page Git Product logo

anipy's Introduction

My Profile

Stats

anipy's People

Contributors

jacekun avatar jindalpratik avatar kortzy avatar marek12306 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

anipy's Issues

Windows [WSL2] TimeoutError: timed out

Hi,

First of all, great program. Works very well in windows.
I prefer using Ubuntu on WSL2, and the program is timing out when attempting a connection in WSL2

image

Traceback:

Traceback (most recent call last):
  File "/mnt/f/Dev_Drive/anipy-wsl2/venv/lib/python3.10/site-packages/urllib3/connectionpool.py", line 536, in _make_request
    response = conn.getresponse()
  File "/mnt/f/Dev_Drive/anipy-wsl2/venv/lib/python3.10/site-packages/urllib3/connection.py", line 454, in getresponse
    httplib_response = super().getresponse()
  File "/usr/lib/python3.10/http/client.py", line 1374, in getresponse
    response.begin()
  File "/usr/lib/python3.10/http/client.py", line 318, in begin
    version, status, reason = self._read_status()
  File "/usr/lib/python3.10/http/client.py", line 279, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "/usr/lib/python3.10/socket.py", line 705, in readinto
    return self._sock.recv_into(b)
TimeoutError: timed out

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

Traceback (most recent call last):
  File "/mnt/f/Dev_Drive/anipy-wsl2/venv/lib/python3.10/site-packages/requests/adapters.py", line 486, in send
    resp = conn.urlopen(
  File "/mnt/f/Dev_Drive/anipy-wsl2/venv/lib/python3.10/site-packages/urllib3/connectionpool.py", line 844, in urlopen
    retries = retries.increment(
  File "/mnt/f/Dev_Drive/anipy-wsl2/venv/lib/python3.10/site-packages/urllib3/util/retry.py", line 470, in increment
    raise reraise(type(error), error, _stacktrace)
  File "/mnt/f/Dev_Drive/anipy-wsl2/venv/lib/python3.10/site-packages/urllib3/util/util.py", line 39, in reraise
    raise value
  File "/mnt/f/Dev_Drive/anipy-wsl2/venv/lib/python3.10/site-packages/urllib3/connectionpool.py", line 790, in urlopen
    response = self._make_request(
  File "/mnt/f/Dev_Drive/anipy-wsl2/venv/lib/python3.10/site-packages/urllib3/connectionpool.py", line 538, in _make_request
    self._raise_timeout(err=e, url=url, timeout_value=read_timeout)
  File "/mnt/f/Dev_Drive/anipy-wsl2/venv/lib/python3.10/site-packages/urllib3/connectionpool.py", line 370, in _raise_timeout
    raise ReadTimeoutError(
urllib3.exceptions.ReadTimeoutError: HTTPConnectionPool(host='gogoanime3.net', port=80): Read timed out. (read timeout=2)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/mnt/f/Dev_Drive/anipy-wsl2/venv/bin/anipy-cli", line 8, in <module>
    sys.exit(main())
  File "/mnt/f/Dev_Drive/anipy-wsl2/venv/lib/python3.10/site-packages/anipy_cli/run_anipy_cli.py", line 8, in main
    cli.run_cli()
  File "/mnt/f/Dev_Drive/anipy-wsl2/venv/lib/python3.10/site-packages/anipy_cli/cli/cli.py", line 37, in run_cli
    cli_class(options=args, rpc_client=rpc_client).run()
  File "/mnt/f/Dev_Drive/anipy-wsl2/venv/lib/python3.10/site-packages/anipy_cli/cli/clis/base_cli.py", line 35, in run
    self.take_input()
  File "/mnt/f/Dev_Drive/anipy-wsl2/venv/lib/python3.10/site-packages/anipy_cli/cli/clis/download_cli.py", line 69, in take_input
    ep_list = ep_class.pick_range()
  File "/mnt/f/Dev_Drive/anipy-wsl2/venv/lib/python3.10/site-packages/anipy_cli/url_handler.py", line 205, in pick_range
    self.entry.latest_ep = self.get_latest()
  File "/mnt/f/Dev_Drive/anipy-wsl2/venv/lib/python3.10/site-packages/anipy_cli/url_handler.py", line 105, in get_latest
    ep_list = self._load_eps_list()
  File "/mnt/f/Dev_Drive/anipy-wsl2/venv/lib/python3.10/site-packages/anipy_cli/url_handler.py", line 43, in _load_eps_list
    r = requests.get(self.entry.category_url, timeout=2)
  File "/mnt/f/Dev_Drive/anipy-wsl2/venv/lib/python3.10/site-packages/requests/api.py", line 73, in get
    return request("get", url, params=params, **kwargs)
  File "/mnt/f/Dev_Drive/anipy-wsl2/venv/lib/python3.10/site-packages/requests/api.py", line 59, in request
    return session.request(method=method, url=url, **kwargs)
  File "/mnt/f/Dev_Drive/anipy-wsl2/venv/lib/python3.10/site-packages/requests/sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
  File "/mnt/f/Dev_Drive/anipy-wsl2/venv/lib/python3.10/site-packages/requests/sessions.py", line 725, in send
    history = [resp for resp in gen]
  File "/mnt/f/Dev_Drive/anipy-wsl2/venv/lib/python3.10/site-packages/requests/sessions.py", line 725, in <listcomp>
    history = [resp for resp in gen]
  File "/mnt/f/Dev_Drive/anipy-wsl2/venv/lib/python3.10/site-packages/requests/sessions.py", line 266, in resolve_redirects
    resp = self.send(
  File "/mnt/f/Dev_Drive/anipy-wsl2/venv/lib/python3.10/site-packages/requests/sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
  File "/mnt/f/Dev_Drive/anipy-wsl2/venv/lib/python3.10/site-packages/requests/adapters.py", line 532, in send
    raise ReadTimeout(e, request=request)
requests.exceptions.ReadTimeout: HTTPConnectionPool(host='gogoanime3.net', port=80): Read timed out. (read timeout=2)

Not sure what's causing this, I installed the repo using python3 -m pip install git+https://github.com/sdaqo/anipy-cli
Don't think it's internet issue.

Would appreciate any help in resolving this. Thank you.

[TUTORIAL] GetNotOnTachi

Hi, I'm not very adept with python scripts in general. I've been trying to figure out how to use that function, but I've no idea. Could you put an example of how to use it?
Thanks!

Invalid \escape in json anime list note

I got the error:

[09:25:54][trim_list]: Loading anime_2021-05-23.json into memory..
Traceback (most recent call last):
  File "D:\Tools\AniPy-1.08\main.py", line 132, in <module>
    fTrim.trim_results(PROJECT_PATH, outputAnime, outputManga)
  File "D:\Tools\AniPy-1.08\func\trim_list.py", line 49, in trim_results
    jsonAnime = json.load(F)
  File "C:\Python38\lib\json\__init__.py", line 293, in load
    return loads(fp.read(),
  File "C:\Python38\lib\json\__init__.py", line 357, in loads
    return _default_decoder.decode(s)
  File "C:\Python38\lib\json\decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "C:\Python38\lib\json\decoder.py", line 353, in raw_decode
    obj, end = self.scan_once(s, idx)
json.decoder.JSONDecodeError: Invalid \escape: line 833 column 39 (char 19667)

line 833 column 39 is a \o in a note, part of an ascii emoji:

		...
		"score": 8,
		"private": "False",
		"notes": "I didn't hate the ending. \o/"
	},

[Request] add cover image URL to JSON output

Hello, I would like to request a feature:

  • URL of cover image of anime/manga
    I do not really know my way around JSON and do not really understand your output chain (i.e.: I'm too stupid to implement this myself). But I wrote a script to give you an Idea of what I mean:
import requests

# Define the GraphQL query to retrieve anime data
query = '''
query ($search: String) {
  Media(search: $search, type: ANIME) {
    coverImage {
      extraLarge
    }
  }
}
'''

# Prompt the user to enter the anime name
anime_name = input('Enter the name of the anime (Romaji): ')

# Define the variables for the GraphQL query
variables = {
    'search': anime_name
}

# Send the GraphQL query to the AniList API
response = requests.post('https://graphql.anilist.co', json={'query': query, 'variables': variables})

# Extract the cover image URL from the API response
try:
    cover_image_url = response.json()['data']['Media']['coverImage']['extraLarge']
except KeyError:
    print('Anime not found!')
else:
    # Modify the URL to get the cover image of the desired size
    cover_image_url = cover_image_url.replace('/large/', '/medium/')

    # Print the cover image URL
    print('Cover image URL:', cover_image_url)

I don't know if this is too much to ask. Either way, thanks for reading this.
Have a good day!
- Parzival

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.