Giter Site home page Giter Site logo

bedethequekomga's People

Contributors

chu-shen avatar inervo avatar pfuenzle avatar vinnpinn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

gregnguyen

bedethequekomga's Issues

[BUG] SyntaxError: invalid decimal literal

Hello , running the script with python 3.11.5 i get

C:\scripts\BedethequeKomga-main>py refreshMetadata.py

Traceback (most recent call last):
File "C:\scripts\BedethequeKomga-main\refreshMetadata.py", line 2, in
from env import InitEnv
File "C:\scripts\BedethequeKomga-main\env.py", line 2, in
from config import *
File "C:\scripts\BedethequeKomga-main\config.py", line 12
KOMGA_LIBRARY_LIST = [0DG3TJ4SPEQ8Q] # retrieve library value from library URL in Komga. Exemple : ['0D10T0X04WXY9', '0D10GBGK4WJZW']
^
SyntaxError: invalid decimal

Thank you for your help

Error when I launch python refreshMetadata.py

Hello,

I just installed this script on Unraid and I have this error when I launch refreshMetadata.py using python 2.7

root@Fabrice:/mnt/user/appdata/BedethequeKomga# python refreshMetadata.py 
  File "refreshMetadata.py", line 21
    if not (serie_name := serie['metadata']['title']):
                       ^
SyntaxError: invalid syntax

Here is the content of my config.py

# Mandatory fields - Komga informations
KOMGA_BASE_URL = "https://my-komga-dns"
KOMGA_EMAIL = "[email protected]"
KOMGA_EMAIL_PASSWORD = "PASSWORD"

# Mandatory fields - Status of the series to update
# By default, 'ONGOING', 'HIATUS' to limit the requests to Bedetheque
KOMGA_STATUS = ['ONGOING', 'HIATUS', 'ABANDONED' , 'ENDED'] # Accept ONGOING HIATUS ABANDONED and ENDED

# Optionnal fields. If empty, will refresh all the books on komga
# Only on these 2 fields can be completed. Of both are, it will generate an error
KOMGA_LIBRARY_LIST = [] # retrieve library value from library URL in Komga
KOMGA_COLLECTION_LIST = [] # retrieve collection value from collection URL in Komga
KOMGA_SERIE_LIST = ['0ASNDRAYWD9WS']

I also tried without KOMGA_SERIE_LIST, with content of serie list in collection list, with nothing in optionnal field but I have the same issue everytime

[REQ] Timer instead of Proxies and Options

Hi, thanks for the job, it's a really good script but going through proxies fail a lot for me...

I think maybe it can be cool if you can setup an option with timer between request (like comicRack scrapper), to protect our ip to be ban. Ok it'll take more time but if you have hudge library, it can be useful.

Other idea is to let the user choose to update only series and not books, personnaly i want to use your script for the status of my series, the rest of metadata are already set!

The last feature i see for now should be to find a way to not scan all the books if already scanned by the script. For example use database to skip scan if already scanned less than 3 month ago... But let option to do force-scan... it'll help to save time!

Thanks!

[BUG] Read timed out during script execution

Describe the bug
Sometimes (often lately) I have a timeout when I launch the script

To Reproduce
Steps to reproduce the behavior:
Run script on one library

Expected behavior
Script should work without error or maybe have the possibility to increase timeout?

Logs

>python refreshMetadata.py
2023-10-03 00:20:32,069 - root - INFO - refreshMetadata.py - Starting refresh in Library mode
2023-10-03 00:20:38,566 - root - WARNING - refreshMetadata.py - Mode No proxy requested, delay between each request = 7 seconds
2023-10-03 00:20:38,567 - root - INFO - refreshMetadata.py - Start updating 38 series
2023-10-03 00:20:55,703 - root - INFO - refreshMetadata.py - Successfully update series 1/38 -  Les ignorants
Traceback (most recent call last):
  File "C:\Users\kesm\AppData\Local\Programs\Python\Python311\Lib\site-packages\urllib3\connectionpool.py", line 449, in _make_request
    six.raise_from(e, None)
  File "<string>", line 3, in raise_from
  File "C:\Users\kesm\AppData\Local\Programs\Python\Python311\Lib\site-packages\urllib3\connectionpool.py", line 444, in _make_request
    httplib_response = conn.getresponse()
                       ^^^^^^^^^^^^^^^^^^
  File "C:\Users\kesm\AppData\Local\Programs\Python\Python311\Lib\http\client.py", line 1378, in getresponse
    response.begin()
  File "C:\Users\kesm\AppData\Local\Programs\Python\Python311\Lib\http\client.py", line 318, in begin
    version, status, reason = self._read_status()
                              ^^^^^^^^^^^^^^^^^^^
  File "C:\Users\kesm\AppData\Local\Programs\Python\Python311\Lib\http\client.py", line 279, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\kesm\AppData\Local\Programs\Python\Python311\Lib\socket.py", line 706, in readinto
    return self._sock.recv_into(b)
           ^^^^^^^^^^^^^^^^^^^^^^^
TimeoutError: timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\kesm\AppData\Local\Programs\Python\Python311\Lib\site-packages\requests\adapters.py", line 489, in send
    resp = conn.urlopen(
           ^^^^^^^^^^^^^
  File "C:\Users\kesm\AppData\Local\Programs\Python\Python311\Lib\site-packages\urllib3\connectionpool.py", line 787, in urlopen
    retries = retries.increment(
              ^^^^^^^^^^^^^^^^^^
  File "C:\Users\kesm\AppData\Local\Programs\Python\Python311\Lib\site-packages\urllib3\util\retry.py", line 550, in increment
    raise six.reraise(type(error), error, _stacktrace)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\kesm\AppData\Local\Programs\Python\Python311\Lib\site-packages\urllib3\packages\six.py", line 770, in reraise
    raise value
  File "C:\Users\kesm\AppData\Local\Programs\Python\Python311\Lib\site-packages\urllib3\connectionpool.py", line 703, in urlopen
    httplib_response = self._make_request(
                       ^^^^^^^^^^^^^^^^^^^
  File "C:\Users\kesm\AppData\Local\Programs\Python\Python311\Lib\site-packages\urllib3\connectionpool.py", line 451, in _make_request
    self._raise_timeout(err=e, url=url, timeout_value=read_timeout)
  File "C:\Users\kesm\AppData\Local\Programs\Python\Python311\Lib\site-packages\urllib3\connectionpool.py", line 340, in _raise_timeout
    raise ReadTimeoutError(
urllib3.exceptions.ReadTimeoutError: HTTPConnectionPool(host='192.168.1.30', port=25600): Read timed out. (read timeout=15)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\kesm\OneDrive\Documents\GitHub\BedethequeKomga\refreshMetadata.py", line 174, in <module>
    refresh_metadata()
  File "C:\Users\kesm\OneDrive\Documents\GitHub\BedethequeKomga\refreshMetadata.py", line 102, in refresh_metadata
    refresh_book_metadata(komga, serie_id, serie_url, proxy = proxy, wait_delay = env.wait_delay)
  File "C:\Users\kesm\OneDrive\Documents\GitHub\BedethequeKomga\refreshMetadata.py", line 111, in refresh_book_metadata
    all_books = komga.get_series_books(series_id)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\kesm\OneDrive\Documents\GitHub\BedethequeKomga\komgaApi.py", line 80, in get_series_books
    response = requests.get(
               ^^^^^^^^^^^^^
  File "C:\Users\kesm\AppData\Local\Programs\Python\Python311\Lib\site-packages\requests\api.py", line 73, in get
    return request("get", url, params=params, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\kesm\AppData\Local\Programs\Python\Python311\Lib\site-packages\requests\api.py", line 59, in request
    return session.request(method=method, url=url, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\kesm\AppData\Local\Programs\Python\Python311\Lib\site-packages\requests\sessions.py", line 587, in request
    resp = self.send(prep, **send_kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\kesm\AppData\Local\Programs\Python\Python311\Lib\site-packages\requests\sessions.py", line 701, in send
    r = adapter.send(request, **kwargs)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\kesm\AppData\Local\Programs\Python\Python311\Lib\site-packages\requests\adapters.py", line 578, in send
    raise ReadTimeout(e, request=request)
requests.exceptions.ReadTimeout: HTTPConnectionPool(host='192.168.1.30', port=25600): Read timed out. (read timeout=15)

Desktop (please complete the following information):

  • Python version: 3.11.5

Additional context
Tried with Komga v1.4.0-HEAD on a library with 38 series (no task running)
Tried with dns and local ip in config file
WAIT_DELAY = 7
USE_PROXIES = False

python3 refreshMetadata.py Error

Hello,
I just installed the repo and try to run and this error appened.

Traceback (most recent call last):
  File "/home/docker1/komgabdtek/BedethequeKomga/refreshMetadata.py", line 4, in <module>
    from bedethequeApi import bedethequeApiProxies, find_series_url, get_comic_series_metadata, \
  File "/home/docker1/komgabdtek/BedethequeKomga/bedethequeApi.py", line 195
    match block.text.strip():
          ^
SyntaxError: invalid syntax

Version of Python : 3.11

I try to update metadata from Spy X Family
https://www.bedetheque.com/serie-71084-BD-Spy-x-Family.html

Same error with Library List

# Mandatory fields - Status of the series to update
# By default, 'ONGOING', 'HIATUS' to limit the requests to Bedetheque
KOMGA_STATUS = ['ONGOING', 'HIATUS'] # Accept ONGOING HIATUS ABANDONED and/or ENDED

# Optionnal fields. If empty, will refresh all the books on komga
# Only on these 3 fields can be completed. If more than 1 is, it will generate an error
KOMGA_LIBRARY_LIST = ['0D6EMQ419JRHS'] # retrieve library value from library URL in Komga. Exemple : ['0D10T0X04WXY9', '0D10GBGK4WJZW']
KOMGA_COLLECTION_LIST = [] # retrieve collection value from collection URL in Komga. Exemple : ['0D10T0X04WXY9', '0D10GBGK4WJZW']
KOMGA_SERIE_LIST = [] # retrieve serie value from serie URL in Komga. Exemple : ['0D10T0X04WXY9', '0D10GBGK4WJZW']

# Optionnal. Set this to True to refresh only series (not books of a series)
SERIES_ONLY = False

# Optionnal. Do not use proxies, but a delay between each request. Default:7 (seconds)
WAIT_DELAY = 7
USE_PROXIES = True

[REQ] Add possibility to retrieve poster from Bedetheque

Is your feature request related to a problem? Please describe.
I was looking at some books parsed using your script and I noticed that some of my books have double page for the first page so it doesn't look good in Komga
image

Describe the solution you'd like
An option to retrieve the poster would be nice

Additional context
I don't know if it's technically possible but it could be helpful!
As I already parsed my library and all items have an url maybe the option should check something else to see if a poster is needed or not?

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.