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
44 [ENHANCEMENTS]
55 - WWW::Mechanize no longer taints the responses it receives. This also
66 removes Test::Taint as a prerequisite.
7+ [DOCUMENTATION]
8+ - Improve FAQ (GH#189) (Julien Fiegehenn)
79
8102.19 2024-09-16 15:25:45Z
911 [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.
446446You can limit this stack size with the C<stack_depth> param in the C<new()>
447447constructor. If you set stack_size to 0, Mech will not keep any history.
448448
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+
449460=cut
You can’t perform that action at this time.
0 commit comments