Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
hacks-perl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Gerhard Gonter
hacks-perl
Commits
34eb8afc
Commit
34eb8afc
authored
7 years ago
by
Gerhard Gonter
Browse files
Options
Downloads
Patches
Plain Diff
testing
parent
d81fca3f
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitignore
+2
-0
2 additions, 0 deletions
.gitignore
scraper/htb.pl
+30
-0
30 additions, 0 deletions
scraper/htb.pl
with
32 additions
and
0 deletions
.gitignore
0 → 100644
+
2
−
0
View file @
34eb8afc
*.swp
@*
This diff is collapsed.
Click to expand it.
scraper/htb.pl
0 → 100755
+
30
−
0
View file @
34eb8afc
#!/usr/bin/perl
use
strict
;
use
FileHandle
;
use
HTML::
TreeBuilder
;
use
Data::
Dumper
;
$
Data::Dumper::
Indent
=
1
;
binmode
STDOUT
,
'
:utf8
';
my
$t1
=
<<"EOX";
<html>
<head>
<title>bla</title>
</head>
<body>
<p ID="par1">Pargraph1</p>
<p ID="par2">Pargraph2 Universit\x{e4}t Wien</p>
<p ID="par3">Pargraph3</p>
<p ID="par4">Pargraph4</p>
</body>
</html>
EOX
my
$htb1
=
HTML::
TreeBuilder
->
new_from_content
(
$t1
);
print
"
htb1:
",
Dumper
(
$htb1
);
my
@x
=
$htb1
->
look_down
(
_tag
=>
'
p
');
print
"
x:
",
Dumper
(
\
@x
);
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment