lucasdavid / wikiart

Full retriever for art and metadata in http://wikiart.org/
MIT License
228 stars 57 forks source link

de BASEURL doesn't work #26

Open dpuschek opened 2 months ago

dpuschek commented 2 months ago

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 commented 2 months ago

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