File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,8 @@ Revision history for WWW::Mechanize
4
4
[ENHANCEMENTS]
5
5
- WWW::Mechanize no longer taints the responses it receives. This also
6
6
removes Test::Taint as a prerequisite.
7
+ [DOCUMENTATION]
8
+ - Improve FAQ (GH#189) (Julien Fiegehenn)
7
9
8
10
2.19 2024-09-16 15:25:45Z
9
11
[DOCUMENTATION]
Original file line number Diff line number Diff line change @@ -446,4 +446,15 @@ keeps a clone of the full Mech object at every step along the way.
446
446
You can limit this stack size with the C<stack_depth> param in the C<new()>
447
447
constructor. If you set stack_size to 0, Mech will not keep any history.
448
448
449
+ =head2 How do I find all the links in a sub-section of a page?
450
+
451
+ If you want to find all the links between two specific parts of content in
452
+ page, you need to modify the content to remove everything else. This is a bit unorthodox,
453
+ but it works.
454
+
455
+ my $html = $mech->content;
456
+ $html =~ s/.*(\n[^n]+foo.*bar[^\n]+).*/$1/ms;
457
+ $mech->update_html( $html );
458
+ $mech->dump_links;
459
+
449
460
=cut
You can’t perform that action at this time.
0 commit comments