• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..16-Jul-2020-

example/scrape/H16-Jul-2020-6247

testdata/H03-May-2022-

README.mdH A D16-Jul-20201.3 KiB2719

apps.goH A D16-Jul-20204.5 KiB14798

apps_test.goH A D16-Jul-20202.5 KiB10691

forms.goH A D16-Jul-20203.3 KiB12078

forms_test.goH A D16-Jul-20203.1 KiB111103

go.modH A D16-Jul-2020287 129

go.sumH A D16-Jul-20202.4 KiB2625

payment.goH A D16-Jul-20201.3 KiB5233

scrape.goH A D16-Jul-20204.6 KiB15496

scrape_test.goH A D16-Jul-2020729 3424

README.md

1[![GoDoc](https://godoc.org/github.com/google/go-github/scrape?status.svg)](https://godoc.org/github.com/google/go-github/scrape)
2
3The scrape package provides an experimental client for accessing additional
4GitHub data via screen scraping.  It is designed to be a client of last resort
5for data that cannot be retrieved via the REST or GraphQL APIs.
6
7# What should be added here
8
9**Add only what you need.**  Whereas the main go-github library attempts to
10implement the entire GitHub REST API, there is little point in trying to do that
11here.  Certainly, feel free to contribution patches to get data you actually
12need, but I'd rather not try and provide exhaustive coverage of all GitHub data
13here.
14
15**Add only what can't be accessed elsewhere.**  If the data can be retrieved
16through the REST or GraphQL API, use the appropriate libraries for that.
17
18**Prefer read-only access.**  For now, I'm only focusing on reading data. It
19might be that writing works fine as well, but it is of course much riskier.
20
21# How to add methods
22
23See [apps.go](apps.go) for examples of methods that access data.  Basically,
24fetch the contents of the page using `client.get`, and then use goquery to dig
25into the markup on the page.  Prefer selectors that grab semantic ID or class
26names, as they are more likely to be stable.
27