Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] BGM scrape error #933

Open
alphatownsman opened this issue Feb 23, 2025 · 1 comment
Open

[BUG] BGM scrape error #933

alphatownsman opened this issue Feb 23, 2025 · 1 comment
Assignees

Comments

@alphatownsman
Copy link
Member

To Reproduce

nm cat https://bgm.tv/subject/9437
[+] Creating 4/4
 ✔ Container neodb-app-typesense-1  Running                                                                                                              0.0s
 ✔ Container neodb-app-redis-1      Running                                                                                                              0.0s
 ✔ Container neodb-app-neodb-db-1   Running                                                                                                              0.0s
 ✔ Container neodb-app-takahe-db-1  Running                                                                                                              0.0s
Fetching from <Bangumi: https://bgm.tv/subject/9437>
Traceback (most recent call last):
  File "/neodb/manage.py", line 22, in <module>
    main()
  File "/neodb/manage.py", line 18, in main
    execute_from_command_line(sys.argv)
  File "/neodb-venv/lib/python3.12/site-packages/django/core/management/__init__.py", line 442, in execute_from_command_line
    utility.execute()
  File "/neodb-venv/lib/python3.12/site-packages/django/core/management/__init__.py", line 436, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/neodb-venv/lib/python3.12/site-packages/django/core/management/base.py", line 412, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/neodb-venv/lib/python3.12/site-packages/django/core/management/base.py", line 458, in execute
    output = self.handle(*args, **options)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/neodb/catalog/management/commands/cat.py", line 46, in handle
    resource = site.scrape()
               ^^^^^^^^^^^^^
  File "/neodb/catalog/sites/bangumi.py", line 227, in scrape
    isbn_type, isbn = detect_isbn_asin(v)
                      ^^^^^^^^^^^^^^^^^^^
  File "/neodb/catalog/book/utils.py", line 56, in detect_isbn_asin
    n = re.sub(r"[^0-9A-Z]", "", s.upper())
                                 ^^^^^^^
AttributeError: 'list' object has no attribute 'upper'
exit status 1
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

@alphatownsman
Copy link
Member Author

@j1g5awi would you help take a look at this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Wishlist
Development

No branches or pull requests

1 participant