Releases: snarfed/granary
Releases · snarfed/granary
v2.2: ### Notable changes
Notable changes
- Add Mastodon support!
- Add Python 3.7 support, and improve overall Python 3 compatibility.
- Update a number of dependencies.
- Switch from Python's built in
json
module toujson
to speed up JSON parsing and encoding. - Add
duration
andsize
support to ActivityStreams 1 and 2, RSS, and microformats2 HTML and JSON. microformats2 support is still emerging for both. Both integer seconds and ISO 8601 string durations are supported forduration
. Integer bytes is used forsize
everywhere. microformats2 HTML also includes human-readable strings, eg5.1 MB
. (#169) - Twitter:
[preview]_create()
: detect attempts to upload images over 5MB and return an error.
- Facebook:
- Add
get_activities(scrape=True)
for scraping HTML from m.facebook.com. Requiresc_user
andxs
cookies from a logged in session (snarfed/bridgy#886). - Upgrade Graph API version from 2.10 to 4.0.
- Add
- Atom:
- Bug fix for de-duping images in attachments.
- RSS:
- Wrap all
<description>
element contents inCDATA
sections. - Render images in
<description>
with HTML<img>
tags (#175). from_activities()
bug fix: don't crash when converting multiple attachments to enclosures in a single item. (RSS only supports one enclosure per item, so we now only include the first, and log a warning if the activity has more.)
- Wrap all
v2.1: ### Notable changes
Notable changes
- Convert AS2
Mention
tags to AS1objectType
mention
(non-standard) and vice versa (snarfed/bridgy-fed#46). - Twitter:
- Bug fix for large block list fetches that get rate limited after a few successful requests.
- Handle HTTP 403 + error code 200 when fetching retweets for a protected or otherwise unavailable tweet (bridgy#688).
- Demote @-mentions from person-tags to mentions. Specifically, this means they'll no longer get rendered with
u-category
mf2.
- Instagram:
- Disabled in the REST API entirely due to Instagram's aggressive rate limiting and blocking (bridgy#655).
- Update scraping to handle replies in new
edge_media_to_parent_comment
field (#164). - Use cookie for all scraping HTTP requests, not just for likes.
- microformats2:
- Revise whitespace handling; use
white-space: pre
CSS in HTML output.
- Revise whitespace handling; use
- Facebook:
- Bug fix: don't interpret
photo.php
as username in post URLs.
- Bug fix: don't interpret
- Atom:
- Switch from
white-space: pre
CSS back to converting newlines to<br>
s because some feed readers (eg NewsBlur) follow it too strictly and don't even line wrap.
- Switch from
- RSS:
- Default title to ellipsized content.
v2.0: ### Notable changes
Notable changes
Breaking change: drop Google+ since it shuts down in March. Notably, this removes the googleplus
module.
v1.15: ### Notable changes
Warning: the next release, 2.0, will drop Google+ support and the googleplus
module entirely, since Google+ is shutting down.
Notable changes
- Add RSS 2.0 output! (#124)
- All silos:
- Switch users' primary URLs from web site to silo profile (#158).
- GitHub:
- Don't enclose bare URLs in
<
/>
(snarfed/bridgy#850).
- Don't enclose bare URLs in
- Atom:
- Bug fix for actors and attachments with multiple image URLs.
- Bug fix for attachment author objects with no properties.
- Google+:
- Drop from web UI and REST API since consumer Google+ is shutting down entirely (more).
- Switch from deprecated global API endpoint to G+ endpoint. Background in snarfed/bridgy#846, Google blog post and docs.
- Instagram:
- Fix individual photo/video link urls for multi-photo/video posts.
- Handle user-provided alt text (#159).
- Twitter:
- Update max video upload size from 5MB to 512MB (#162).
/url
: Return HTTP 400 when fetching the user's URL results in an infinite redirect.
v1.14: ### Notable changes
Notable changes
Add delete()
. Currently includes Twitter and Flickr support.
- Instagram:
- Make extra HTTP fetch (with cookie) to get individual likes (snarfed/bridgy#840).
- Update scraping logic to handle feed HTML changes.
- Link @-mentions in comments as well as photo/video captions.
- GitHub:
create
/preview_create
bug fixes for issues and comments on private repos.- Handle HTTP 410 Gone responses from REST API, eg when a repo has been deleted or issues for the repo disabled.
- Twitter:
- Add
delete()
andpreview_delete()
for deleting tweets.
- Add
- Flickr:
- Add
delete()
andpreview_delete()
for deleting photos.
- Add
- microformats2:
- Atom:
- Encode
&
s in author URL and email address too. (Thanks sebsued!)
- Encode
- AS2:
- Add
Follow
support.
- Add
v1.13: ### Notable changes
Notable changes
- Twitter:
- Support ISO 8601 formatted created_at timestamps, which the archive download uses, as well as RFC 2822 from the API.
create()
andpreview_create()
: support RSVPs. Tweet them as normal tweets with the RSVP content. (snarfed/bridgy#818)create()
andpreview_create()
: support alt text for images, via AS1displayName
. (snarfed/bridgy#756).
- Instagram:
- Add global rate limiting lock for scraping. If a scraping HTTP request gets a 429 or 503 response, we refuse to make more requests for 5m, and instead short circuit and return the same error. This can be overridden with a new
ignore_rate_limit
kwarg toget_activities()
.
- Add global rate limiting lock for scraping. If a scraping HTTP request gets a 429 or 503 response, we refuse to make more requests for 5m, and instead short circuit and return the same error. This can be overridden with a new
- GitHub:
- Add
tag
support tocreate
/preview_create
to add label(s) to existing issues (snarfed/bridgy#811). - Escape HTML characters (
<
,>
, and&
) in content increate()
andpreview_create()
(snarfed/bridgy#810). get_activities()
andget_comment()
now returnValueError
instead ofAssertionError
on malformedactivity_id
andcomment_id
args, respectively.get_activities()
bug fix for issues/PRs with no body text.- Switch from GraphQL to REST API for creating comments and reactions, since GraphQL hits authorization errors on many org repos. (snarfed/bridgy#824)
- Improve GraphQL support for comments and users.
- Add
- Atom:
- Shorten and ellipsize feed title when necessary (#144).
- microformats2:
- Upgrade mf2py to improve a few things like implied p-name detection and whitespace handling (#142, fixes #145, snarfed/bridgy#756, snarfed/bridgy#828).
- Support
alt
attribute in<img>
tags (snarfed/bridgy#756).
v1.12: ### Notable changes
Notable changes
- Add Python 3 support! Granary now requires either Python 2.7+ or Python 3.3+.
- Instagram:
- Fix scraping profile pages.
- Twitter:
- Update character counting to handle Twitter change that now auto-links all ccTLDs. Background.
- GitHub:
- Bug fix for
get_activities()
with deleted issues and repos.
- Bug fix for
- microformats2:
object_to_json()
: convert tags to simple strings in thecategory
property, not full nested objects likeh-card
s (#141).- Special case GitHub issues that are in-reply-to a repo or its
/issues
URL to be objectTypeissue
. - Render simple string categories in HTML output.
This release is intentionally small and limited in scope to contain any impact of the Python 3 migration. It should be a noop for existing Python 2 users, and we've tested thoroughly, but I'm sure there are still bugs. Please file issues if you notice anything broken!
v1.11: ### Notable changes
Notable changes
- Add GitHub!
- Twitter:
- Prefer MP4 and other video/... content types to HLS (.m3u8) etc. Background.
- Prefer HTTPS URLs for media images.
get_activities()
: Support @-prefixed usernames inuser_id
.
- Facebook:
- Support new recurring aka multi-instance events.
create()
andpreview_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.
- Support new recurring aka multi-instance events.
- Instagram:
- Extract more user (
author
) data from scraped profile pages. - Fix home page feed scraping.
- Extract more user (
- 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 tojson_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 #131. - Fix
share
verb handling inactivity_to_json()
andactivities_to_html()
#134. - Remember which content contains HTML, preserve newlines in it, and don't translate those newlines to
<br>
s (#130).
- Atom:
- Fix timezone bugs in
updated
andpublished
.
- Fix timezone bugs in
- JSON Feed:
- Omit title from items if it's the same as the content. (Often caused by microformats2's implied
p-name
logic.)
- Omit title from items if it's the same as the content. (Often caused by microformats2's implied
v1.10: ### Notable changes
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.
- Fix a bug in
preview_create
that auto-linked @-mentions inside URLs, 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
, andu-audio
classes more often and consistently.
- Atom:
- Add
atom_to_activities()
for converting full feed documents. - Add to REST API and web UI.
- Add
- JSON Feed:
- Fix bug that omitted title in some cases (#122).
v1.9: ### Notable changes
Notable changes
- Add ActivityStreams 2.0! New
as2
module includesto_as1()
andfrom_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.
- Add new
- JSON Feed:
- Raise ValueError on bad (non-dict) input.
- REST API:
- Add
as2
value forformat
andinput
. Revise existing ActivityStreams and microformats2 value names toas1
,as1-xml
, andmf2-json
. Old valuesactivitystreams
,json
,json-mf2
, andxml
are still accepted, but deprecated.
- Add