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

Tutorial improvements #37

Open
mtrunkat opened this issue Oct 29, 2019 · 0 comments
Open

Tutorial improvements #37

mtrunkat opened this issue Oct 29, 2019 · 0 comments

Comments

@mtrunkat
Copy link
Member

  • The getting started guide doesn't mention how to enqueue requests manually, I found it somewhere in the SDK docs. Maybe giving an example of enqueueing requests manually in the getting started guide would be helpful for people starting out with writing a web-scraper.
  • Again about the context.enqueueRequest() function I was not sure if I can use it asynchronously or not? for example, is it ok to pass an async function to each():
subCategoriesSelector.each(async function() {
            // Suffix sub category link with a limit of 96
            var scLink = $(this).attr('href').replace('#', '?limit=96');
            //log.info(`SubCategory Link: ${scLink}`);
            await context.enqueueRequest({
                url:`${baseURL}/${scLink}`,
                userData: {
                    "label": "LIST"
                    }
                }
            );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

1 participant