Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

crawling support? #6

Open
matthewmueller opened this issue Aug 31, 2016 · 2 comments
Open

crawling support? #6

matthewmueller opened this issue Aug 31, 2016 · 2 comments

Comments

@matthewmueller
Copy link

I love this idea! I was wondering if there's crawling support (basically go to the links of all links on the page), or if there's any plans to add it?

@GromNaN
Copy link

GromNaN commented Dec 6, 2016

It seams to be the purpose of the visit method. But I can't figure how to use it.

@renato
Copy link

renato commented Jan 8, 2019

Two years later, if anyone wants to use visit, you use it within an a selector, and you can scrape this visited content too. The only issue is that GraphQL isn't recursive and you can't create a fragment that would result in a loop/recursion (like following a pagination).

A simple example that visits all td.title > a websites and return their <title>.

{
  page(url:"http://news.ycombinator.com") {
    items: query(selector:"tr.athing") {
      rank: text(selector:"td span.rank")
      title: text(selector:"td.title a")
      sitebit: text(selector:"span.comhead a")
      content: query(selector:"td.title > a") {
        visit {
          title
        }
      }
    }
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants