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

de BASEURL doesn't work #26

Open
dpuschek opened this issue Jul 19, 2024 · 1 comment
Open

de BASEURL doesn't work #26

dpuschek opened this issue Jul 19, 2024 · 1 comment

Comments

@dpuschek
Copy link

I like to get the German titles of paintings. I just tried changing BASEURL in settings.py to 'de' without luck:

WikiArt base url.

BASE_URL = 'https://www.wikiart.org/de/App'

python3 wikiart.py --datadir ./new-dir/ fetch --only 'van gogh'

[code]
WikiArt.

Author: Lucas David -- ld492@drexel.edu
License: MIT License (c) 2016

info: Fetching artists... Done (5.26 sec)

Fetching paintings of artist: van gogh (Metadata retrieval is slow and can take minutes. Please be patient)
Traceback (most recent call last):
File "/var/downloads/wikiart/wikiart-master/wikiart.py", line 4, in
main()
File "/var/downloads/wikiart/wikiart-master/wikiart/console.py", line 109, in main
Console().interpret()
File "/var/downloads/wikiart/wikiart-master/wikiart/console.py", line 68, in interpret
args.func(args)
File "/var/downloads/wikiart/wikiart-master/wikiart/console.py", line 91, in fetch
f.fetch_artist(args.only).copy_everything()
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/var/downloads/wikiart/wikiart-master/wikiart/fetcher.py", line 143, in fetch_artist
if re.search(artist_name.lower(), artist['artistName'].lower()):
^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'lower'

[/code]

Is there any chance to make it work?

@lucasdavid
Copy link
Owner

Try switching to apiv2 branch before making the language change:

rm 
git stash  # clear changes to settings.py
git checkout apiv2
git stash pop  # re-apply changes to settings.py
rm -rf new-dir
python wikiart.py ...

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

No branches or pull requests

2 participants