Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Scraping a website - Unterminated quoted string

by huck (Prior)
on May 04, 2017 at 18:55 UTC ( [id://1189519]=note: print w/replies, xml ) Need Help??


in reply to Scraping a website - Unterminated quoted string

In this line

if ($html =~ m/href="(\/listing\/category.inland\/prepare\/last-news\/ +\d+">)Weiter/) {
your capture includes stuff into $1 not considered part of the url, including double quotes. Try this
if ($html =~ m/href="(\/listing\/category.inland\/prepare\/last-news\/ +\d+)">Weiter/) {
same at
if ($html =~ m/href="(\/inland\/\d+\-.*?\/" class="cover__link link "> +)/g)
try
if ($html =~ m/href="(\/inland\/\d+\-.*?\/)" class="cover__link link " +>/g)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1189519]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (3)
As of 2024-04-19 21:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found