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

National Geographic Downloader - HTTPError: 403 #661

Closed
hacksysteam opened this issue Nov 14, 2023 · 2 comments
Closed

National Geographic Downloader - HTTPError: 403 #661

hacksysteam opened this issue Nov 14, 2023 · 2 comments

Comments

@hacksysteam
Copy link

Version of Variety
0.8.9 - PPA - Ubuntu -Jammy

Describe the bug
National Geographic Downloader is broken.

Context
Every time and even on the latest version.

To Reproduce

  1. Just use tail -f /var/log/syslog

Attach Variety's log file

$ variety -v

INFO: 2023-11-14 12:01:53,567: main() 'Using profile folder /home/ashfaq/.config/variety/'
INFO: 2023-11-14 12:01:53,569: perform_upgrade() 'Last run version was 0.8.9 or earlier, current version is 0.8.9'
INFO: 2023-11-14 12:01:53,713: process_command() 'Received command: ['-v']'
INFO: 2023-11-14 12:01:53,716: start() 'Using data_path /usr/share/variety'
INFO: 2023-11-14 12:01:53,716: load() 'Jumble loading'
INFO: 2023-11-14 12:01:53,717: _walk_modules() 'Jumble loading module in __init__ from /usr/lib/python3/dist-packages/variety/plugins/builtin/__init__.py'
INFO: 2023-11-14 12:01:53,717: _walk_modules() 'Jumble loading module in __init__ from /usr/lib/python3/dist-packages/variety/plugins/builtin/display_modes/__init__.py'
INFO: 2023-11-14 12:01:53,717: _walk_modules() 'Jumble loading module in GnomeDisplayModesPlugin from /usr/lib/python3/dist-packages/variety/plugins/builtin/display_modes/GnomeDisplayModesPlugin.py'
INFO: 2023-11-14 12:01:53,718: load() 'Jumble found plugin class: <class 'GnomeDisplayModesPlugin.GnomeDisplayModesPlugin'>: {'name': 'GnomeDisplayModesPlugin', 'description': 'Display modes relying on the underlying desktop environment', 'version': '1.0', 'author': 'Peter Levi'}'
INFO: 2023-11-14 12:01:53,718: _walk_modules() 'Jumble loading module in ResizingDisplayModesPlugin from /usr/lib/python3/dist-packages/variety/plugins/builtin/display_modes/ResizingDisplayModesPlugin.py'
INFO: 2023-11-14 12:01:53,718: load() 'Jumble found plugin class: <class 'ResizingDisplayModesPlugin.ResizingDisplayModesPlugin'>: {'name': 'ResizingDisplayModesPlugin', 'description': 'Display modes that use image resizing within Variety', 'version': '1.0', 'author': 'Peter Levi'}'
INFO: 2023-11-14 12:01:53,718: _walk_modules() 'Jumble loading module in LegacyDisplayModesPlugin from /usr/lib/python3/dist-packages/variety/plugins/builtin/display_modes/LegacyDisplayModesPlugin.py'
INFO: 2023-11-14 12:01:53,719: load() 'Jumble found plugin class: <class 'LegacyDisplayModesPlugin.LegacyDisplayModesPlugin'>: {'name': 'LegacyDisplayModesPlugin', 'description': 'Legacy display mode for compatibility with past Variety versions', 'version': '1.0', 'author': 'Peter Levi'}'
INFO: 2023-11-14 12:01:53,719: _walk_modules() 'Jumble loading module in ArtStationDownloader from /usr/lib/python3/dist-packages/variety/plugins/builtin/downloaders/ArtStationDownloader.py'
INFO: 2023-11-14 12:01:53,720: _walk_modules() 'Jumble loading module in EarthviewDownloader from /usr/lib/python3/dist-packages/variety/plugins/builtin/downloaders/EarthviewDownloader.py'
INFO: 2023-11-14 12:01:53,720: load() 'Jumble found plugin class: <class 'EarthviewDownloader.EarthviewDownloader'>: {'name': 'EarthviewDownloader', 'description': 'Google Earth View Wallpapers', 'author': 'Peter Levi', 'version': '0.1'}'
INFO: 2023-11-14 12:01:53,720: _walk_modules() 'Jumble loading module in WallhavenSource from /usr/lib/python3/dist-packages/variety/plugins/builtin/downloaders/WallhavenSource.py'
INFO: 2023-11-14 12:01:53,722: load() 'Jumble found plugin class: <class 'WallhavenSource.WallhavenSource'>: {'name': 'WallhavenSource', 'description': 'Configurable source for fetching images from Wallhaven.cc', 'author': 'Peter Levi', 'version': '0.1'}'
INFO: 2023-11-14 12:01:53,722: _walk_modules() 'Jumble loading module in __init__ from /usr/lib/python3/dist-packages/variety/plugins/builtin/downloaders/__init__.py'
INFO: 2023-11-14 12:01:53,722: _walk_modules() 'Jumble loading module in MediaRSSDownloader from /usr/lib/python3/dist-packages/variety/plugins/builtin/downloaders/MediaRSSDownloader.py'
INFO: 2023-11-14 12:01:53,723: _walk_modules() 'Jumble loading module in UnsplashDownloader from /usr/lib/python3/dist-packages/variety/plugins/builtin/downloaders/UnsplashDownloader.py'
INFO: 2023-11-14 12:01:53,723: load() 'Jumble found plugin class: <class 'UnsplashDownloader.UnsplashDownloader'>: {'name': 'UnsplashDownloader', 'description': 'High-resolution photos from Unsplash.com', 'author': 'Peter Levi', 'version': '0.1'}'
INFO: 2023-11-14 12:01:53,723: _walk_modules() 'Jumble loading module in WallhavenLegacyDownloader from /usr/lib/python3/dist-packages/variety/plugins/builtin/downloaders/WallhavenLegacyDownloader.py'
INFO: 2023-11-14 12:01:53,724: _walk_modules() 'Jumble loading module in NationalGeographicDownloader from /usr/lib/python3/dist-packages/variety/plugins/builtin/downloaders/NationalGeographicDownloader.py'
INFO: 2023-11-14 12:01:53,724: load() 'Jumble found plugin class: <class 'NationalGeographicDownloader.NationalGeographicDownloader'>: {'name': 'NationalGeographicDownloader', 'description': "National Geographic's photo of the day", 'author': 'Eric Rösch', 'version': '0.1'}'
INFO: 2023-11-14 12:01:53,725: _walk_modules() 'Jumble loading module in MediaRSSSource from /usr/lib/python3/dist-packages/variety/plugins/builtin/downloaders/MediaRSSSource.py'
INFO: 2023-11-14 12:01:53,725: load() 'Jumble found plugin class: <class 'MediaRSSSource.MediaRSSSource'>: {'name': 'MediaRSSSource', 'description': 'Configurable source for fetching images from MediaRSS feeds', 'author': 'Peter Levi', 'version': '0.1'}'
INFO: 2023-11-14 12:01:53,726: _walk_modules() 'Jumble loading module in WallhavenDownloader from /usr/lib/python3/dist-packages/variety/plugins/builtin/downloaders/WallhavenDownloader.py'
INFO: 2023-11-14 12:01:53,726: _walk_modules() 'Jumble loading module in RedditDownloader from /usr/lib/python3/dist-packages/variety/plugins/builtin/downloaders/RedditDownloader.py'
INFO: 2023-11-14 12:01:53,727: _walk_modules() 'Jumble loading module in ArtStationSource from /usr/lib/python3/dist-packages/variety/plugins/builtin/downloaders/ArtStationSource.py'
INFO: 2023-11-14 12:01:53,727: load() 'Jumble found plugin class: <class 'ArtStationSource.ArtStationSource'>: {'name': 'ArtStationSource', 'description': 'Configurable source for fetching images from ArtStation', 'author': 'Denis Gordeev', 'version': '0.1'}'
INFO: 2023-11-14 12:01:53,728: _walk_modules() 'Jumble loading module in BingDownloader from /usr/lib/python3/dist-packages/variety/plugins/builtin/downloaders/BingDownloader.py'
INFO: 2023-11-14 12:01:53,728: load() 'Jumble found plugin class: <class 'BingDownloader.BingDownloader'>: {'name': 'BingDownloader', 'description': 'Bing Photo of the Day', 'author': 'Peter Levi', 'version': '0.1'}'
INFO: 2023-11-14 12:01:53,728: _walk_modules() 'Jumble loading module in RedditSource from /usr/lib/python3/dist-packages/variety/plugins/builtin/downloaders/RedditSource.py'
INFO: 2023-11-14 12:01:53,729: load() 'Jumble found plugin class: <class 'RedditSource.RedditSource'>: {'name': 'RedditSource', 'description': 'Configurable source for fetching images from Reddit', 'author': 'Peter Levi', 'version': '0.1'}'
INFO: 2023-11-14 12:01:53,729: _walk_modules() 'Jumble loading module in APODDownloader from /usr/lib/python3/dist-packages/variety/plugins/builtin/downloaders/APODDownloader.py'
INFO: 2023-11-14 12:01:53,730: load() 'Jumble found plugin class: <class 'APODDownloader.APODDownloader'>: {'name': 'APODDownloader', 'description': 'NASA Astro Pic of the Day', 'author': 'Peter Levi', 'version': '0.1'}'
INFO: 2023-11-14 12:01:53,730: _walk_modules() 'Jumble loading module in UnsplashConfigurableSource from /usr/lib/python3/dist-packages/variety/plugins/builtin/downloaders/UnsplashConfigurableSource.py'
INFO: 2023-11-14 12:01:53,731: load() 'Jumble found plugin class: <class 'UnsplashConfigurableSource.UnsplashConfigurableSource'>: {'name': 'UnsplashConfigurableSource', 'description': 'Configurable source for fetching photos from Unsplash.com', 'author': 'Peter Levi', 'version': '0.1'}'
INFO: 2023-11-14 12:01:53,731: _walk_modules() 'Jumble loading module in FortuneSource from /usr/lib/python3/dist-packages/variety/plugins/builtin/quotes/FortuneSource.py'
INFO: 2023-11-14 12:01:53,732: load() 'Jumble found plugin class: <class 'FortuneSource.FortuneSource'>: {'name': 'UNIX fortune program', 'description': 'Displays quotes using the UNIX fortune program. You may want to install additional fortune packs, e.g. fortunes-bofh-excuses.', 'author': 'Dan Jones', 'version': '0.1'}'
INFO: 2023-11-14 12:01:53,732: _walk_modules() 'Jumble loading module in QuotationsPageSource from /usr/lib/python3/dist-packages/variety/plugins/builtin/quotes/QuotationsPageSource.py'
INFO: 2023-11-14 12:01:53,747: load() 'Jumble found plugin class: <class 'QuotationsPageSource.QuotationsPageSource'>: {'name': 'TheQuotationsPage.com', 'description': 'Fetches quotes from TheQuotationsPage.com', 'author': 'Peter Levi', 'version': '0.1'}'
INFO: 2023-11-14 12:01:53,748: _walk_modules() 'Jumble loading module in __init__ from /usr/lib/python3/dist-packages/variety/plugins/builtin/quotes/__init__.py'
INFO: 2023-11-14 12:01:53,748: _walk_modules() 'Jumble loading module in GoodreadsSource from /usr/lib/python3/dist-packages/variety/plugins/builtin/quotes/GoodreadsSource.py'
INFO: 2023-11-14 12:01:53,748: load() 'Jumble found plugin class: <class 'GoodreadsSource.GoodreadsSource'>: {'name': 'Goodreads', 'description': 'Fetches quotes from Goodreads.com', 'author': 'Peter Levi', 'version': '0.1'}'
INFO: 2023-11-14 12:01:53,749: _walk_modules() 'Jumble loading module in UrbanDictionarySource from /usr/lib/python3/dist-packages/variety/plugins/builtin/quotes/UrbanDictionarySource.py'
INFO: 2023-11-14 12:01:53,749: load() 'Jumble found plugin class: <class 'UrbanDictionarySource.UrbanDictionarySource'>: {'name': 'Urban Dictionary', 'description': 'Displays definitions from Urban Dictionary', 'author': 'James Miller', 'version': '0.1'}'
INFO: 2023-11-14 12:01:53,749: _walk_modules() 'Jumble loading module in LocalFilesSource from /usr/lib/python3/dist-packages/variety/plugins/builtin/quotes/LocalFilesSource.py'
INFO: 2023-11-14 12:01:53,750: load() 'Jumble found plugin class: <class 'LocalFilesSource.LocalFilesSource'>: {'name': 'Local text files', 'description': 'Displays quotes, defined in local text files.\nPut your own txt files in: ~/.config/variety/pluginconfig/quotes/.\nThe file format is:\n\nquote -- author\n.\nsecond quote -- another author\n.\netc...\n\nExample: http://rvelthuis.de/zips/quotes.txt', 'author': 'Peter Levi', 'version': '0.1'}'
INFO: 2023-11-14 12:01:53,773: reload_config() 'Creating new downloader for type flickr, location user:www.flickr.com/photos/peter-levi/;user_id:93647178@N00;'
INFO: 2023-11-14 12:01:53,773: reload_config() 'Creating new downloader for type apod, location NASA's Astronomy Picture of the Day'
INFO: 2023-11-14 12:01:53,773: reload_config() 'Creating new downloader for type bing, location Bing Photo of the Day'
INFO: 2023-11-14 12:01:53,773: reload_config() 'Creating new downloader for type earthview, location Google Earth View Wallpapers'
INFO: 2023-11-14 12:01:53,773: reload_config() 'Creating new downloader for type unsplash, location High-resolution photos from Unsplash.com'
INFO: 2023-11-14 12:01:53,774: reload_config() 'Creating new downloader for type natgeo, location National Geographic's photo of the day'
INFO: 2023-11-14 12:01:53,774: log_options() 'Loaded options:'
INFO: 2023-11-14 12:01:53,774: log_options() 'change_enabled = True'
INFO: 2023-11-14 12:01:53,775: log_options() 'change_interval = 600'
INFO: 2023-11-14 12:01:53,775: log_options() 'change_on_start = True'
INFO: 2023-11-14 12:01:53,775: log_options() 'clipboard_enabled = False'
INFO: 2023-11-14 12:01:53,775: log_options() 'clipboard_hosts = ['wallhaven.cc', 'wallpapers.net', 'flickr.com', 'imgur.com', 'deviantart.com', 'interfacelift.com', 'vladstudio.com', 'imageshack.us', 'deviantart.net', 'imageshack.com']'
INFO: 2023-11-14 12:01:53,775: log_options() 'clipboard_use_whitelist = True'
INFO: 2023-11-14 12:01:53,775: log_options() 'clock_date_font = Sans 30'
INFO: 2023-11-14 12:01:53,775: log_options() 'clock_enabled = False'
INFO: 2023-11-14 12:01:53,775: log_options() 'clock_filter = -density 100 -font `fc-match -f '%{file[0]}' '%CLOCK_FONT_NAME'` -pointsize %CLOCK_FONT_SIZE -gravity SouthEast -fill '#00000044' -annotate 0x0+[%HOFFSET+58]+[%VOFFSET+108] '%H:%M' -fill white -annotate 0x0+[%HOFFSET+60]+[%VOFFSET+110] '%H:%M' -font `fc-match -f '%{file[0]}' '%DATE_FONT_NAME'` -pointsize %DATE_FONT_SIZE -fill '#00000044' -annotate 0x0+[%HOFFSET+58]+[%VOFFSET+58] '%A, %B %d' -fill white -annotate 0x0+[%HOFFSET+60]+[%VOFFSET+60] '%A, %B %d''
INFO: 2023-11-14 12:01:53,775: log_options() 'clock_font = Sans 70'
INFO: 2023-11-14 12:01:53,775: log_options() 'configfile = /home/ashfaq/.config/variety/variety.conf'
INFO: 2023-11-14 12:01:53,775: log_options() 'copyto_enabled = False'
INFO: 2023-11-14 12:01:53,775: log_options() 'copyto_folder = Default'
INFO: 2023-11-14 12:01:53,775: log_options() 'desired_color = [160, 160, 160]'
INFO: 2023-11-14 12:01:53,775: log_options() 'desired_color_enabled = False'
INFO: 2023-11-14 12:01:53,775: log_options() 'download_folder = /home/ashfaq/.config/variety/Downloaded'
INFO: 2023-11-14 12:01:53,775: log_options() 'download_preference_ratio = 0.9'
INFO: 2023-11-14 12:01:53,775: log_options() 'favorites_folder = /home/ashfaq/.config/variety/Favorites'
INFO: 2023-11-14 12:01:53,775: log_options() 'favorites_operations = [['Downloaded', 'Copy'], ['Fetched', 'Move'], ['Others', 'Copy']]'
INFO: 2023-11-14 12:01:53,775: log_options() 'fetched_folder = /home/ashfaq/.config/variety/Fetched'
INFO: 2023-11-14 12:01:53,775: log_options() 'filters = [[False, 'Keep original', ''], [False, 'Grayscale', '-type Grayscale'], [False, 'Heavy blur', '-scale 20% -blur 0x10 -resize 500%'], [False, 'Soft blur', '-scale 20% -blur 0x2 -resize 500%'], [False, 'Oil painting', '-paint 8'], [False, 'Pointilism', '-spread 10 -noise 3'], [False, 'Pixellate', '-scale 3% -scale 3333%']]'
INFO: 2023-11-14 12:01:53,776: log_options() 'get_wallpaper_script = /home/ashfaq/.config/variety/scripts/get_wallpaper'
INFO: 2023-11-14 12:01:53,776: log_options() 'icon = Light'
INFO: 2023-11-14 12:01:53,776: log_options() 'internet_enabled = True'
INFO: 2023-11-14 12:01:53,776: log_options() 'lightness_enabled = False'
INFO: 2023-11-14 12:01:53,776: log_options() 'lightness_mode = 0'
INFO: 2023-11-14 12:01:53,776: log_options() 'min_rating = 4'
INFO: 2023-11-14 12:01:53,776: log_options() 'min_rating_enabled = False'
INFO: 2023-11-14 12:01:53,776: log_options() 'min_size = 80'
INFO: 2023-11-14 12:01:53,776: log_options() 'min_size_enabled = False'
INFO: 2023-11-14 12:01:53,776: log_options() 'quota_enabled = True'
INFO: 2023-11-14 12:01:53,776: log_options() 'quota_size = 1000'
INFO: 2023-11-14 12:01:53,776: log_options() 'quotes_authors = '
INFO: 2023-11-14 12:01:53,776: log_options() 'quotes_bg_color = [80, 80, 80]'
INFO: 2023-11-14 12:01:53,776: log_options() 'quotes_bg_opacity = 55'
INFO: 2023-11-14 12:01:53,776: log_options() 'quotes_change_enabled = False'
INFO: 2023-11-14 12:01:53,776: log_options() 'quotes_change_interval = 300'
INFO: 2023-11-14 12:01:53,776: log_options() 'quotes_disabled_sources = ['Urban Dictionary']'
INFO: 2023-11-14 12:01:53,776: log_options() 'quotes_enabled = False'
INFO: 2023-11-14 12:01:53,776: log_options() 'quotes_favorites_file = /home/ashfaq/.config/variety/favorite_quotes.txt'
INFO: 2023-11-14 12:01:53,776: log_options() 'quotes_font = Sans 30'
INFO: 2023-11-14 12:01:53,776: log_options() 'quotes_hpos = 100'
INFO: 2023-11-14 12:01:53,777: log_options() 'quotes_max_length = 250'
INFO: 2023-11-14 12:01:53,777: log_options() 'quotes_tags = '
INFO: 2023-11-14 12:01:53,777: log_options() 'quotes_text_color = [255, 255, 255]'
INFO: 2023-11-14 12:01:53,777: log_options() 'quotes_text_shadow = True'
INFO: 2023-11-14 12:01:53,777: log_options() 'quotes_vpos = 40'
INFO: 2023-11-14 12:01:53,777: log_options() 'quotes_width = 70'
INFO: 2023-11-14 12:01:53,777: log_options() 'safe_mode = False'
INFO: 2023-11-14 12:01:53,777: log_options() 'set_wallpaper_script = /home/ashfaq/.config/variety/scripts/set_wallpaper'
INFO: 2023-11-14 12:01:53,777: log_options() 'slideshow_custom_enabled = False'
INFO: 2023-11-14 12:01:53,777: log_options() 'slideshow_custom_folder = /home/ashfaq/Pictures'
INFO: 2023-11-14 12:01:53,777: log_options() 'slideshow_downloads_enabled = False'
INFO: 2023-11-14 12:01:53,777: log_options() 'slideshow_fade = 0.4'
INFO: 2023-11-14 12:01:53,777: log_options() 'slideshow_favorites_enabled = True'
INFO: 2023-11-14 12:01:53,777: log_options() 'slideshow_mode = Fullscreen'
INFO: 2023-11-14 12:01:53,777: log_options() 'slideshow_monitor = All'
INFO: 2023-11-14 12:01:53,777: log_options() 'slideshow_pan = 0.05'
INFO: 2023-11-14 12:01:53,777: log_options() 'slideshow_seconds = 6.0'
INFO: 2023-11-14 12:01:53,777: log_options() 'slideshow_sort_order = Random'
INFO: 2023-11-14 12:01:53,777: log_options() 'slideshow_sources_enabled = True'
INFO: 2023-11-14 12:01:53,778: log_options() 'slideshow_zoom = 0.2'
INFO: 2023-11-14 12:01:53,778: log_options() 'smart_enabled = False'
INFO: 2023-11-14 12:01:53,778: log_options() 'smart_notice_shown = False'
INFO: 2023-11-14 12:01:53,778: log_options() 'smart_register_shown = False'
INFO: 2023-11-14 12:01:53,778: log_options() 'sources = [[True, 'favorites', 'The Favorites folder'], [True, 'fetched', 'The Fetched folder'], [True, 'folder', '/usr/share/backgrounds'], [True, 'flickr', 'user:www.flickr.com/photos/peter-levi/;user_id:93647178@N00;'], [True, 'apod', "NASA's Astronomy Picture of the Day"], [True, 'bing', 'Bing Photo of the Day'], [True, 'earthview', 'Google Earth View Wallpapers'], [True, 'unsplash', 'High-resolution photos from Unsplash.com'], [True, 'natgeo', "National Geographic's photo of the day"]]'
INFO: 2023-11-14 12:01:53,778: log_options() 'stats_enabled = True'
INFO: 2023-11-14 12:01:53,778: log_options() 'stats_notice_shown = False'
INFO: 2023-11-14 12:01:53,778: log_options() 'sync_enabled = True'
INFO: 2023-11-14 12:01:53,778: log_options() 'use_landscape_enabled = True'
INFO: 2023-11-14 12:01:53,778: log_options() 'wallhaven_api_key = '
INFO: 2023-11-14 12:01:53,778: log_options() 'wallpaper_auto_rotate = True'
INFO: 2023-11-14 12:01:53,778: log_options() 'wallpaper_display_mode = os'
INFO: 2023-11-14 12:01:53,778: reload_config() 'No need to clear prepared queue'
INFO: 2023-11-14 12:01:53,778: update_indicator() 'Setting file info to: /home/ashfaq/.config/variety/Downloaded/nasa_apod/PerseveranceSol354Nav1_1br2_KenKremer.jpg'
INFO: 2023-11-14 12:01:53,780: load_banned() 'Missing or invalid banned URLs list, no URLs will be banned'
INFO: 2023-11-14 12:01:53,780: load_last_change_time() 'Change interval < 6 hours, ignore persisted last_change_time, wait initially the whole interval: 600'
INFO: 2023-11-14 12:01:53,780: update_indicator() 'Setting file info to: /home/ashfaq/.config/variety/Downloaded/nasa_apod/PerseveranceSol354Nav1_1br2_KenKremer.jpg'
INFO: 2023-11-14 12:01:53,782: regular_change_thread() 'regular_change thread running'
INFO: 2023-11-14 12:01:53,782: prepare_thread() 'Prepare thread running'
INFO: 2023-11-14 12:01:53,782: prepare_thread() 'Prepared buffer contains 0 images'
INFO: 2023-11-14 12:01:53,782: prepare_thread() 'Preparing some images'
INFO: 2023-11-14 12:01:53,783: get_throttling() 'Bing: parsing serverside options'
INFO: 2023-11-14 12:01:53,783: get_throttling() 'Could not parse Bing serverside options, using defaults None, None'
INFO: 2023-11-14 12:01:53,783: get_throttling() 'Bing: parsing serverside options'
INFO: 2023-11-14 12:01:53,784: get_throttling() 'Could not parse Bing serverside options, using defaults None, None'
INFO: 2023-11-14 12:01:53,784: download_one() 'Bing: Downloading an image, config: None'
INFO: 2023-11-14 12:01:53,784: update_indicator_icon() 'Creating indicator'
INFO: 2023-11-14 12:01:53,784: download_one() 'Bing: Queue size: 0'
INFO: 2023-11-14 12:01:53,833: get_throttling() 'Bing: parsing serverside options'
INFO: 2023-11-14 12:01:53,834: get_throttling() 'Could not parse Bing serverside options, using defaults None, None'
INFO: 2023-11-14 12:01:53,834: download_one() 'Bing: Filling queue'
INFO: 2023-11-14 12:01:53,846: create_indicator() 'indicator backend: AyatanaAppIndicator3'
INFO: 2023-11-14 12:01:53,863: set_from_theme_icon() 'Showing indicator icon variety-indicator from GTK theme'
INFO: 2023-11-14 12:01:53,880: do_set_wp() 'Calling do_set_wp with /home/ashfaq/.config/variety/Downloaded/nasa_apod/PerseveranceSol354Nav1_1br2_KenKremer.jpg, time: 1699943513.880731'
INFO: 2023-11-14 12:01:53,881: apply_auto_rotate() 'ImageMagick auto-rotate cmd: convert /home/ashfaq/.config/variety/Downloaded/nasa_apod/PerseveranceSol354Nav1_1br2_KenKremer.jpg -auto-orient /home/ashfaq/.config/variety/wallpaper/wallpaper-auto-rotated-a60d671e6c903bdeac0da89ea56f8dd1.jpg'
INFO: 2023-11-14 12:01:53,888: prepare_thread() 'After search prepared buffer contains 84 images'
INFO: 2023-11-14 12:01:54,091: update_indicator() 'Setting file info to: /home/ashfaq/.config/variety/Downloaded/nasa_apod/PerseveranceSol354Nav1_1br2_KenKremer.jpg'
INFO: 2023-11-14 12:01:54,094: list_files() 'More than 1 files in the folders, stop listing'
INFO: 2023-11-14 12:01:54,401: download_one() 'Bing: Queue populated with 7 URLs'
INFO: 2023-11-14 12:01:54,402: save_locally() 'Origin URL: https://www.bing.com/search?q=badlands+national+park&form=hpcapt&filters=HpDate%3a%2220231110_0800%22'
INFO: 2023-11-14 12:01:54,402: save_locally() 'Image URL: https://www.bing.com/th?id=OHR.BadlandsSunrise_EN-US7576048436_1920x1080.jpg&rf=LaDigue_1920x1080.jpg&pid=hp'
INFO: 2023-11-14 12:01:54,402: save_locally() 'Local path: /home/ashfaq/.config/variety/Downloaded/Bing/OHR.BadlandsSunrise_EN-US7576048436_1920x1080.jpg'
INFO: 2023-11-14 12:01:54,403: save_locally() 'File already exists, skip downloading'
INFO: 2023-11-14 12:01:55,153: reload() 'Reloading preferences dialog'
INFO: 2023-11-14 12:01:55,405: get_throttling() 'Unsplash.com: parsing serverside options'
INFO: 2023-11-14 12:01:55,405: get_throttling() 'Could not parse Unsplash.com serverside options, using defaults 10, 1'
INFO: 2023-11-14 12:01:55,405: get_throttling() 'Unsplash.com: parsing serverside options'
INFO: 2023-11-14 12:01:55,405: get_throttling() 'Could not parse Unsplash.com serverside options, using defaults 10, 1'
INFO: 2023-11-14 12:01:55,405: download_one() 'Unsplash.com: Downloading an image, config: None'
INFO: 2023-11-14 12:01:55,406: download_one() 'Unsplash.com: Queue size: 0'
INFO: 2023-11-14 12:01:55,406: get_throttling() 'Unsplash.com: parsing serverside options'
INFO: 2023-11-14 12:01:55,406: get_throttling() 'Could not parse Unsplash.com serverside options, using defaults 10, 1'
INFO: 2023-11-14 12:01:55,406: download_one() 'Unsplash.com: Filling queue'
INFO: 2023-11-14 12:01:55,406: fill_queue() 'Filling Unsplash queue from https://api.unsplash.com/photos/random?count=30&client_id=072e5048dfcb73a8d9ad59fcf402471518ff8df725df462b0c4fa665f466515a&orientation=landscape'
INFO: 2023-11-14 12:01:55,888: trigger_download() 'Triggering download thread to check if download needed and possible'
ERROR: 2023-11-14 12:01:56,495: fill_queue() 'Could not process an item from Unsplash'
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/variety/plugins/builtin/downloaders/UnsplashDownloader.py", line 109, in fill_queue
    "keywords": [cat["title"].lower().strip() for cat in item["categories"]],
KeyError: 'categories'
ERROR: 2023-11-14 12:01:56,495: download_one_from() 'Could not download wallpaper:'
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/variety/VarietyWindow.py", line 1164, in download_one_from
    file = downloader.download_one()
  File "/usr/lib/python3/dist-packages/variety/plugins/downloaders/DefaultDownloader.py", line 141, in download_one
    items = self.fill_queue()
  File "/usr/lib/python3/dist-packages/variety/plugins/builtin/downloaders/UnsplashDownloader.py", line 109, in fill_queue
    "keywords": [cat["title"].lower().strip() for cat in item["categories"]],
KeyError: 'categories'
INFO: 2023-11-14 12:01:57,499: get_throttling() 'National Geographic: parsing serverside options'
INFO: 2023-11-14 12:01:57,499: get_throttling() 'Could not parse National Geographic serverside options, using defaults None, None'
INFO: 2023-11-14 12:01:57,499: get_throttling() 'National Geographic: parsing serverside options'
INFO: 2023-11-14 12:01:57,499: get_throttling() 'Could not parse National Geographic serverside options, using defaults None, None'
INFO: 2023-11-14 12:01:57,500: download_one() 'National Geographic: Downloading an image, config: None'
INFO: 2023-11-14 12:01:57,500: download_one() 'National Geographic: Queue size: 0'
INFO: 2023-11-14 12:01:57,500: get_throttling() 'National Geographic: parsing serverside options'
INFO: 2023-11-14 12:01:57,500: get_throttling() 'Could not parse National Geographic serverside options, using defaults None, None'
INFO: 2023-11-14 12:01:57,500: download_one() 'National Geographic: Filling queue'
ERROR: 2023-11-14 12:01:57,943: download_one_from() 'Could not download wallpaper:'
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/variety/VarietyWindow.py", line 1164, in download_one_from
    file = downloader.download_one()
  File "/usr/lib/python3/dist-packages/variety/plugins/downloaders/DefaultDownloader.py", line 141, in download_one
    items = self.fill_queue()
  File "/usr/lib/python3/dist-packages/variety/plugins/builtin/downloaders/NationalGeographicDownloader.py", line 54, in fill_queue
    queue = Util.fetch_json(DATA_URL)
  File "/usr/lib/python3/dist-packages/variety/Util.py", line 684, in fetch_json
    return Util.request(url, data, **request_kwargs).json()
  File "/usr/lib/python3/dist-packages/variety/Util.py", line 663, in request
    r.raise_for_status()
  File "/usr/local/lib/python3.10/dist-packages/requests/models.py", line 1021, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: https://www.nationalgeographic.co.uk/page-data/photo-of-day/page-data.json
INFO: 2023-11-14 12:01:58,783: set_wallpaper() 'Calling set_wallpaper with /home/ashfaq/.config/variety/Downloaded/Earth View/Antarctica (ID-1870).jpg'
INFO: 2023-11-14 12:01:58,783: prepare_thread() 'Prepared buffer contains 84 images'

Desktop environment and version
GNOME

OS name and version

Ubuntu 22.04.3 LTS

PRETTY_NAME="Ubuntu 22.04.3 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.3 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
@AndrewSav
Copy link

AndrewSav commented Jan 6, 2024

Adding a referer seems to do the trick:

curl 'https://www.nationalgeographic.co.uk/page-data/photo-of-day/page-data.json' -H 'referer: https://www.nationalgeographic.co.uk/photo-of-day'

I searched for:

$ sudo find / -iname NationalGeographicDownloader.py
usr/lib/python3/dist-packages/variety/plugins/builtin/downloaders/NationalGeographicDownloader.py

And then patched it with the header.

--- ./NationalGeographicDownloader.py	2024-01-07 00:01:32.902208565 +1300
+++ /usr/lib/python3/dist-packages/variety/plugins/builtin/downloaders/NationalGeographicDownloader.py	2024-01-07 00:02:25.590369407 +1300
@@ -51,7 +51,7 @@
         return self.ROOT_URL
 
     def fill_queue(self):
-        queue = Util.fetch_json(DATA_URL)
+        queue = Util.fetch_json(DATA_URL,headers = {"referer": "https://www.nationalgeographic.co.uk/photo-of-day"})
         images = queue["result"]["pageContext"]["node"]["data"]["content"]["images"]
         return images

Started working afterwards

@jlu5
Copy link
Member

jlu5 commented Jan 11, 2025

It looks like this workaround no longer works, and the old JSON data URL just redirects to the homepage (which is not valid JSON). #734 tracks the new issue

@jlu5 jlu5 closed this as not planned Won't fix, can't repro, duplicate, stale Jan 11, 2025
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

3 participants