A gallery is a special kind of reddit post, which can have up to 20
images. They can be recognized by the is_gallery field in the JSON.
The gallery_data array describes the structure of the gallery by
referencing the image ids, it also contains the captions and links, which
are ignored by this implementation. The s field of each entry in
media_metadata array appears to reference the highest quality image.
getJsonURL and getGID were modified to handle reddit.com/gallery/id
links. parseJsonChild was modified to handle the gallery case. The new
method handleGallery parses gallery_data and media_metadata and adds the
images to download. A test for a gallery was added.
xlecx has changed its URL from 'xlecx.com' to 'xlecx.org'. This change modifies the ripper.java to reflect that change, and to add the required https prefix. If the https prefix is not added, the image download fails with 'no protocol'. That seems a little janky, but it was used in #120.
- Changed redgifs api URL to reflect updated change
- Added check in getNextPage to see if page has any URLs else finishes
rather than throwing error
- Added gifdeliverynetwork.com as knwon host as it redirects to redgifs
page
- Added reddit compatibility by adding as known host in RipUtils reddit
ripper
- Unit test to cover above changes
- Using similar functionality found in the gfycat ripper the same was
done for the redgifs ripper
- A user's profile can be ripped, by retrieving all gfycats from their
user api call
- The categories and search ripper is also implemented but uses and
incrementing start and count in the api url paramters as the
cursor requires cookies (I believe) to work and this one just
increments until there are no gfycats and returns error (there are
no more gfycats)
- Differentiated between getting profile and search urls using regex
matching