Granary

Latest version: v8.1

Safety actively analyzes 723177 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 4 of 6

1.11

Not secure
Notable changes
* Add GitHub!
* `get_activities()` supports issues and pull requests, including comments and reactions. It's currently based on notifications, so it's best effort, not comprehensive, and only includes recently active issues/PRs.
* `create()` and `preview_create()` support issues, comments, [stars](https://help.github.com/articles/about-stars), and [reactions](https://help.github.com/articles/about-conversations-on-github/#reacting-to-ideas-in-comments).
* Twitter:
* Prefer MP4 and other video/... content types to HLS (.m3u8) etc. [Background.](https://twittercommunity.com/t/retiring-mp4-video-output/66093)
* Prefer HTTPS URLs for media images.
* `get_activities()`: Support -prefixed usernames in `user_id`.
* Facebook:
* Support new [recurring aka multi-instance events](https://stackoverflow.com/questions/45131646/decoding-recurring-events-from-facebook-open-graph-api). `create()` and `preview_create()` now only support RSVPs to individual instances of multi-instance events, to match the Facebook API itself.
* Try harder to find original (full) sized photo URLs, specifically `_o.jpg` files instead of `_s.jpg`.
* `create()` bug fix for photo and image URLs with unicode characters.
* Fixed bug where `get_activities(user_id=...)` included the authenticated user's own recent photos, albums, and news publishes.
* Instagram:
* Extract more user (`author`) data from scraped profile pages.
* Fix home page feed scraping.
* microformats2, Atom:
* Add enclosures for image attachments.
* Bug fixes for rendering image, video, and audio attachments inside shares and attachments. De-dupe images.
* microformats2:
* Handle simple string-only author properties.
* Add `fetch_mf2` kwarg to `json_to_object()` for fetching additional pages over HTTP to determine authorship.
* Generate explicit blank `p-name` in HTML to prevent old flawed [implied p-name handling](http://microformats.org/wiki/microformats2-implied-properties) [#131](https://github.com/snarfed/granary/issues/131).
* Fix `share` verb handling in `activity_to_json()` and `activities_to_html()` [134](https://github.com/snarfed/granary/issues/134).
* Remember which content contains HTML, preserve newlines in it, and don't translate those newlines to `<br>`s ([130](https://github.com/snarfed/granary/issues/130)).
* Atom:
* Fix timezone bugs in `updated` and `published`.
* JSON Feed:
* Omit title from items if it's the same as the content. (Often caused by microformats2's implied `p-name` logic.)

1.10

Not secure
Notable changes
* Moved web site and REST API to granary.io! granary-demo.appspot.com now 301 redirects.
* Twitter:
* Update the publish character limit to 280. [Background.](https://twittercommunity.com/t/updating-the-character-limit-and-the-twitter-text-library/96425)
* Fix a [bug in `preview_create` that auto-linked -mentions inside URLs](https://github.com/snarfed/bridgy/issues/527#issuecomment-346302800), e.g. Medium posts.
* Support videos and animated GIFs in `get_activities()` etc.
* Instagram:
* Add cookie query param to REST API to allow scraping that logged in user's feed.
* HTML (including Atom content):
* Render image, video, and audio attachments more often and consistently.
* Include microformats2 `u-photo`, `u-video`, and `u-audio` classes more often and consistently.
* Atom:
* Add `atom_to_activities()` for converting full feed documents.
* Add to REST API and web UI.
* JSON Feed:
* Fix bug that omitted title in some cases ([122](https://github.com/snarfed/granary/issues/122)).

1.9

Not secure
Notable changes
* Add [ActivityStreams 2.0](http://www.w3.org/TR/activitystreams-core/)! New `as2` module includes `to_as1()` and `from_as1()` functions. Currently supported: articles, notes, replies, likes, reposts, events, RSVPs, tags, attachments.
* Atom:
* Add new `atom_to_activity()` function for converting Atom to AS1.
* Add email field to author, if provided.
* JSON Feed:
* Raise ValueError on bad (non-dict) input.
* REST API:
* Add `as2` value for `format` and `input`. Revise existing ActivityStreams and microformats2 value names to `as1`, `as1-xml`, and `mf2-json`. Old values `activitystreams`, `json`, `json-mf2`, and `xml` are still accepted, but deprecated.

1.8

Not secure
Notable changes
* Add [JSON Feed](https://jsonfeed.org/) support to both library and REST API.
* Twitter:
* Add `get_blocklist()`.
* Bug fix for creating replies, favorites, or retweets of video URLs, e.g. https://twitter.com/name/status/123/video/1 .
* Bug fix for parsing favorites HTML to handle a small change on Twitter's side.
* `post_id()` now validates ids more strictly before returning them.
* Facebook:
* Improve heuristic for determining privacy of wall posts from other users.
* Support GIFs in comments (attachment types `animated_image_autoplay` and `animated_image_share`).
* Upgrade Graph API from [v2.6](https://developers.facebook.com/docs/apps/changelog#v2_6) to [v2.10](https://developers.facebook.com/docs/apps/changelog#v2_10).
* Instagram:
* Update scraping to handle new home page (ie news feed) JSON schema, which changed sometime around 2017-02-27. (Profile pages and individual photo/video permalinks still haven't changed yet.)
* microformats2:
* Add [`u-featured`](https://indieweb.org/featured) to ActivityStreams `image`.
* Improve `h-event` support.
* Minor whitespace change (added <p>) when rendering locations as HTML.
* `post_id()` now validates ids more strictly before returning them.
* Fix bugs in converting latitude and longitude between ActivityStreams and mf2.
* Google+:
* Update HTML scraping to handle changed serialized JSON data format.
* Atom:
* Add new `activity_to_atom()` function that renders a single top-level `<entry>` instead of `<feed>`.
* Add new `reader` query param for toggling rendering decisions that are specific to feed readers. Right now, just affects location: it's rendered in the content when `reader=true` (the default), omitted when `reader=false`.
* Include author name when rendering attached articles and notes (e.g. quote tweets).
* Only include AS `activity:object-type` and `activity:verb` elements when they have values.
* Render AS image and mf2 u-photo if they're not already in content.
* Render `thr:in-reply-to` from `object.inReplyTo` as well as `activity.context.inReplyTo`.
* REST API:
* Fix bugs in html => json-mf2 and html => html conversions.
* Upgrade brevity to 0.2.14 for a couple [bug](https://github.com/kylewm/brevity/issues/5) [fixes](https://github.com/kylewm/brevity/issues/6).

1.7

Not secure
Notable changes
- microformats2:
- Interpret `h-cite` and [`u-quotation-of` (experimental)](https://indieweb.org/quotation#How_to_markup) as attachments, e.g. for quote tweets.
- Convert [audio](http://indieweb.org/audio) and [video](http://indieweb.org/video) properties to AS attachments.
- Twitter:
- Linkify -mentions and hashtags in `preview_create()`.
- Support creating quote tweets from attachments with Twitter URLs.
- When converting quote tweets to AS, strip quoted tweet URL from end of text.
- Raise ValueError when `get_activities()` is passed `group_id='search'` but not `search_query`.
- Instagram:
- Improve HTML scraping error handling.
- Support [multi-photo/video posts](https://www.instagram.com/p/BQ0mDB2gV_O/).
- Facebook:
- Disable creating "interested" RSVPs, since Facebook's API doesn't allow it.
- Atom:
- Support [media enclosures](http://atomenabled.org/developers/syndication/#link) for audio and video attachments.
- Source.get_activities(): start raising ValueError on bad argument values, notably invalid Facebook and Twitter ids and Instagram search queries.
- Fix rendering and linkifying content with Unicode high code points (ie above the 16-bit Basic Multilingual Plane), including some emoji, on "narrow" builds of Python 2 with `--enable-unicode=ucs2`, which is the default on Mac OS X, Windows, and older *nix.

1.6

Not secure
Notable changes
- Twitter:
- Handle new "extended" tweets with hidden reply-to -mentions and trailing
URLs for media, quote tweets, etc. Background:
https://dev.twitter.com/overview/api/upcoming-changes-to-tweets
- Bug fix: ensure like.author.displayName is a plain unicode string so that it
can be pickled normally, e.g. by App Engine's memcache.
- Bug fix: handle names with emoji correctly in favorites_html_to_likes().
- Bug fix: handle search queries with unicode characters.
- Atom:
- Render full original quoted tweet in retweets of quote tweets.
- microformats2 HTML:
- Optionally follow and fetch rel="author" links.
- Improve mapping between microformats2 and ActivityStreams 'photo' types. (mf2 'photo' type is a note or article _with_ a photo, but AS 'photo' type _is_ a photo. So, map mf2 photos to underlying type without photo.)
- Support location properties beyond h-card, e.g. h-adr, h-geo, u-geo, and even
when properties like latitude and longitude appear at the top level.
- Error handling: return HTTP 502 for non-JSON API responses, 504 for connection failures.

Page 4 of 6

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.