Description
The Hawker gem is a web scraper which allows you to pull the basic information for given social media profile URL. No structure knowledge or API access required
The Hawker Ruby gem alternatives and similar gems
Based on the "Web Crawling" category.
Alternatively, view The Hawker Ruby gem alternatives based on common mentions on social networks and blogs.
-
FastImage
FastImage finds the size or type of an image given its uri by fetching as little as needed -
Wombat
Lightweight Ruby web crawler/scraper with an elegant DSL which extracts structured data from pages. -
MetaInspector
Ruby gem for web scraping purposes. It scrapes a given URL, and returns you its title, meta description, meta keywords, links, images... -
Spidr
A versatile Ruby web spidering library that can spider a site, multiple domains, certain links or infinitely. Spidr is designed to be fast and easy to use. -
LinkThumbnailer
Ruby gem that fetches images and metadata from a given URL. Much like popular social website with link preview. -
instabot.rb
An instagram bot works without instagram api, only needs your username and password. written in ruby -
Kimurai
DISCONTINUED. Kimurai is a modern web scraping framework written in Ruby which works out of box with Headless Chromium/Firefox, PhantomJS, or simple HTTP requests and allows to scrape and interact with Javascript rendered websites
CodeRabbit: AI Code Reviews for Developers
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of The Hawker Ruby gem or a related project?
README
The Hawker Ruby gem
The Hawker gem is a web scraper which allows you to pull the basic information for given social media profile URL. No structure knowledge or API access required. Keep in mind that it's always better to use the API if possible.
Installation
gem install hawker
What social media providers are supported?
Currently, the gem supports Github, Twitter and Instagram. If you need the support for another social media provider, please feel free to open new issue or push your own code and prepare pull request.
Usage examples
The gem has built in matching mechanism so you can pass any link and it will automatically use the proper driver.
GitHub
You can request the profile information using this code:
profile = Hawker.get("https://github.com/rubyhero")
profile.username # => "rubyhero"
Following attributes are available:
name
- The name of the requested userusername
- The username of the requested user - it's also visible in the URLcompany
- The company name of the requested user if availablelocation
- The location of the requested user if availablewebsite
- The website URL of the requested userrepositories
- The count of the requested user repositoriesstars
- The number of stars that the requested user gavefollowers
- The number of people that are following the requested userfollowing
- The number of people followed by the requested user
You can request the profile information using this code:
profile = Hawker.get("https://twitter.com/pdabrowski_k1")
profile.name # => "Paweł Dąbrowski"
Following attributes are available:
name
- The name of the requested userbio
- The biography note of the requested userlocation
- The location of the requested user if availablewebsite
- The website URL of the requested userjoined
- The account creation date for the requested usertweets
- The number of messages tweeted by the requested userfollowers
- The number of people that are following the requested userfollowing
- The number of people followed by the requested userlikes
- The number of likes that the requested user gavelists
- The number of lists created by the requested user
You can request the profile information using this code:
profile = Hawker.get("https://www.instagram.com/someprofile")
profile.full_name # => "Full name"
Following attributes are available:
biography
- The biography note of the requested userfollowers
- The number of people that are following the requested userfollowing
- The number of people followed by the requested userfull_name
- The full name of the requested userexternal_url
- The URL from the biography note of the requested userprofile_pic_url
- The URL of the requested profile pictureusername
- The username of the requested user
Supported Ruby Versions
This gem was tested on the 2.5.0 version. If it's not working with older versions please add a new issue.
Copyright
Copyright (c) 2018 Paweł Dąbrowski. See [LICENSE][] for details.
*Note that all licence references and agreements mentioned in the The Hawker Ruby gem README section above
are relevant to that project's source code only.