source_code_search: Find any alphanumeric snippet, signature or keyword in the...

Description Usage Arguments Details Value References Examples

View source: R/search.R

Description

The API is highly restrictive, even for paid plans, but even the free plan provides some insight into the makeup of the top 3 million web sites.

Usage

1
2
source_code_search(query, snippets = FALSE,
  pw_api_key = Sys.getenv("PUBLICWWW_API_KEY"))

Arguments

query

query string

snippets

if TRUE then include snippets in the download

pw_api_key

PublicWWW API KEY

Details

The API key can be provided at the time of calling, but it is recommended that the caller store it in the PUBLICWWW_API_KEY environment variable (a good place for that is ~/.Renviron).

Value

data frame (tibble)

References

PublicWWW home; Query syntax; API Pricing

Examples

1
2
3
4
5
# Sites using the WordPress theme "Twenty Sixteen":
source_code_search('"/wp-content/themes/twentysixteen/"')

# Sites running the coinhive JS miner:
source_code_search('"coin-hive.com/lib/coinhive.min.js"')

hrbrmstr/publicwww documentation built on May 28, 2019, 2:31 a.m.