Get direct image and video URLs from Pinterest.
Note: Users in Iran may need a VPN to access Pinterest.
gem install pinterest-dlrequire 'pinterest-dl'url = PinterestDL.get_image_url('https://www.pinterest.com/pin/example/')url = PinterestDL.get_video_url('https://www.pinterest.com/pin/example/')# Search for pins with a specific query
results = PinterestDL.search('nature landscape', limit: 10)
# Returns an array of pin objects with:
# id, pin_url, title, description, image_url, video_url
# Get only image URLs from search results
images = PinterestDL.search_images('sunset', limit: 5)
# => ["https://i.pinimg.com/originals/...", ...]
# Get only video URLs from search results
videos = PinterestDL.search_videos('tutorial', limit: 3)
# => ["https://v.pinimg.com/videos/...", ...]
# Get search results as JSON
json_results = PinterestDL.search_json('anime art', limit: 20)
# => Returns formatted JSON stringMIT © monji024
