Repository navigation
Commit df1178c
authored
fix(crawlers): Parse HTML responses starting with an XML declaration as HTML in
### Description
- `ParselCrawler` now parses `text/html` and `application/xhtml+xml`
responses as HTML, even when the page starts with an XML declaration.
Since `parsel` 1.12, such pages were parsed as XML, so CSS selectors and
`enqueue_links` found nothing on XHTML pages.ParselCrawler (#2262)1 parent 3da1880 commit df1178c
2 files changed
Lines changed: 27 additions & 2 deletions
File tree
- src/crawlee/crawlers/_parsel
- tests/unit/crawlers/_parsel
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
53 | 57 | | |
54 | 58 | | |
55 | | - | |
56 | | - | |
| 59 | + | |
| 60 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
548 | 548 | | |
549 | 549 | | |
550 | 550 | | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
0 commit comments