Skip to content

Conversation

@Mantisus
Copy link
Collaborator

@Mantisus Mantisus commented Dec 16, 2025

Description

  • Add guide "HttpCrawler with custom parser".

Issues

@Mantisus Mantisus requested review from janbuchar and vdusek December 16, 2025 20:08
@Mantisus Mantisus self-assigned this Dec 16, 2025
@codecov
Copy link

codecov bot commented Dec 16, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.49%. Comparing base (7f17a43) to head (bbc0157).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1622      +/-   ##
==========================================
- Coverage   92.50%   92.49%   -0.01%     
==========================================
  Files         157      157              
  Lines       10437    10439       +2     
==========================================
+ Hits         9655     9656       +1     
- Misses        782      783       +1     
Flag Coverage Δ
unit 92.49% <100.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Collaborator

@janbuchar janbuchar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the guide Max. While the code contained in there works, the idea was to use AbstractHttpCrawler along with a custom implementation of AbstractHttpParser - similarly to how BeautifulSoupCrawler and company are implemented.

The cool thing about this is that you can then use the parser class in AdaptivePlaywrightCrawler as well.

@Mantisus
Copy link
Collaborator Author

While the code contained in there works, the idea was to use AbstractHttpCrawler along with a custom implementation of AbstractHttpParser - similarly to how BeautifulSoupCrawler and company are implemented.

Got it. What do you think about expanding this guide with another section on implementation based on AbstractHttpCrawler?

@janbuchar
Copy link
Collaborator

While the code contained in there works, the idea was to use AbstractHttpCrawler along with a custom implementation of AbstractHttpParser - similarly to how BeautifulSoupCrawler and company are implemented.

Got it. What do you think about expanding this guide with another section on implementation based on AbstractHttpCrawler?

Well, just adding it to the bottom won't cut it, but you can make the guide into two parts - quick and dirty solution and the "native" way. You can also explain the benefits of each approach.

@Mantisus Mantisus requested a review from janbuchar December 18, 2025 03:27
Copy link
Collaborator

@janbuchar janbuchar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is shaping up real nice, thank you!

@Mantisus Mantisus requested a review from janbuchar December 19, 2025 00:12
Copy link
Collaborator

@vdusek vdusek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

I'm also updating the description to note that this resolves #702 as well, due to saxonche.

However, I would say this content would fit better in the HTTP crawlers guide. I'd suggest merging it there.

"Using HttpCrawler with a custom parser" could be the next section after "HttpCrawler", and "Creating a custom crawler" is essentially the same as "Creating a custom HTTP crawler".

@Mantisus Mantisus requested review from janbuchar and vdusek December 19, 2025 15:25
Copy link
Collaborator

@vdusek vdusek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is really good, thanks!

Just a few minor things... Mostly regarding more concise titles and consistent grammatical forms.

'AdaptivePlaywrightCrawler',
'AdaptivePlaywrightCrawlingContext',
'AdaptivePlaywrightPreNavCrawlingContext',
'AdaptivePlaywrightCrawlerStatisticState',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this was private until now, we should expose it in a separate "feat:" PR, as it extends the public interface.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure. #1635

Mantisus and others added 8 commits December 20, 2025 16:20
Co-authored-by: Vlada Dusek <v.dusek96@gmail.com>
Co-authored-by: Vlada Dusek <v.dusek96@gmail.com>
Co-authored-by: Vlada Dusek <v.dusek96@gmail.com>
Co-authored-by: Vlada Dusek <v.dusek96@gmail.com>
Co-authored-by: Vlada Dusek <v.dusek96@gmail.com>
Co-authored-by: Vlada Dusek <v.dusek96@gmail.com>
Co-authored-by: Vlada Dusek <v.dusek96@gmail.com>
Co-authored-by: Vlada Dusek <v.dusek96@gmail.com>
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

Successfully merging this pull request may close these issues.

Add scrapling as a parser Integrate an HTML parser with XPath 2 support

3 participants