Socket
Socket
Sign inDemoInstall

github.com/google/go-github/scrape

Package Overview
Dependencies
5
Alerts
File Explorer

Install Socket

Detect and block malicious and high-risk dependencies

Install

    github.com/google/go-github/scrape

Package scrape provides a client for interacting with GitHub using screen scraping. This is intended to be used as a supplement to the standard go-github library to access data that is not currently exposed by either the official REST or GraphQL APIs. Because of the nature of screen scraping, this package should be treated as HIGHLY EXPERIMENTAL, and potentially unstable. We make no promises relating to compatibility or stability of the exported API. Even though this package is distributed as part of the go-github library, it is explicitly exempt from any stability promises that my be implied by the library version number.


Version published

Readme

Source

GoDoc

The scrape package provides an experimental client for accessing additional GitHub data via screen scraping. It is designed to be a client of last resort for data that cannot be retrieved via the REST or GraphQL APIs.

What should be added here

Add only what you need. Whereas the main go-github library attempts to implement the entire GitHub REST API, there is little point in trying to do that here. Certainly, feel free to contribution patches to get data you actually need, but I'd rather not try and provide exhaustive coverage of all GitHub data here.

Add only what can't be accessed elsewhere. If the data can be retrieved through the REST or GraphQL API, use the appropriate libraries for that.

Prefer read-only access. For now, I'm only focusing on reading data. It might be that writing works fine as well, but it is of course much riskier.

How to add methods

See apps.go for examples of methods that access data. Basically, fetch the contents of the page using client.get, and then use goquery to dig into the markup on the page. Prefer selectors that grab semantic ID or class names, as they are more likely to be stable.

FAQs

Last updated on 24 Jan 2024

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc