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

Feature: Support for crawling dynamic javascript heavy site #10

Open
indrajithi opened this issue Jun 14, 2024 · 5 comments
Open

Feature: Support for crawling dynamic javascript heavy site #10

indrajithi opened this issue Jun 14, 2024 · 5 comments
Assignees
Labels
enhancement New feature or request

Comments

@indrajithi
Copy link
Collaborator

indrajithi commented Jun 14, 2024

Description:

Enhance the existing web crawler to support crawling and extracting content from websites that rely heavily on JavaScript for rendering their content. This feature will involve integrating a headless browser to accurately render and interact with such pages.

Objectives:

  • Enable the crawler to fetch and parse content from JavaScript-heavy sites.
  • Use a headless browser to render JavaScript content. (explore playwright-python)
  • Ensure compatibility with the existing crawler structure and options.
  • Maintain the ability to switch between the default fetching method and the headless browser.

Design Considerations:

  • Single Headless Browser Instance:
    • Use a single instance of a headless browser to handle multiple asynchronous requests, reducing resource consumption.
  • Concurrency Management:
    • Utilize asyncio and a semaphore to manage concurrent requests within the same browser context.
    • Integrate the asynchronous fetching logic with our existing web crawler structure.
  • Error Handling:
    • Ensure proper error handling and resource cleanup. (no zombie browsers, they are already headless :p)
    • Fall back to default fetching mode when there is a error with the headless browser. (keep the user informed)
@indrajithi indrajithi added the enhancement New feature or request label Jun 15, 2024
@indrajithi
Copy link
Collaborator Author

Blocked by #17

@Mews
Copy link
Collaborator

Mews commented Jun 17, 2024

What does blocked mean? I'd like to work on this but do you think I shouldn't?

@indrajithi
Copy link
Collaborator Author

@Mews You can work on this. I want to complete #17 before picking this up. I have merged the MR for that. Although there are a few more things to be done for #17. I believe this issue can be unblocked.

Since this is going to be relatively bigger story. Let us first discuss the approach and spec out the requirements and acceptance criteria.

@Mews
Copy link
Collaborator

Mews commented Jun 17, 2024

Alright makes sense I'll work on the v1 milestone too then.
I'll pick this up when v1 gets released 👍

@indrajithi
Copy link
Collaborator Author

indrajithi commented Jun 17, 2024

You can create Issues for things in #24 you find interesting and pick it up. Meanwhile I will spec out some details in this Issue. Also I think we should have this in v1.

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

No branches or pull requests

2 participants