Skip to main content

Enter a Flickr URL, and find out what sort of URL it is (single photo, album, gallery, etc.)

Project description

This is a library for parsing Flickr URLs. You enter a Flickr URL, and it tells you what sort of URL it is.

Examples:

>>> from flickr_url_parser import parse_flickr_url

>>> parse_flickr_url('https://www.flickr.com/photos/sdasmarchives/50567413447')
{'type': 'single_photo', 'photo_id': '50567413447'}

>>> parse_flickr_url('https://www.flickr.com/photos/aljazeeraenglish/albums/72157626164453131')
{'type': 'album', 'user_url': 'https://www.flickr.com/photos/aljazeeraenglish', 'album_id': '72157626164453131'}

>>> parse_flickr_url('https://www.flickr.com/people/blueminds/')
{'type': 'user', 'user_url': 'https://www.flickr.com/photos/blueminds'}

This was extracted as a standalone bit of functionality from Flinumeratr, a toy that shows you a list of photos that can be viewed at a Flickr URL.

Usage

See the examples above.

For more information about the possible return values from the function, use the help function:

>>> from flickr_url_parser import parse_flickr_url
>>> help(parse_flickr_url)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

flickr-url-parser-1.0.0.tar.gz (9.5 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page