Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

mit Perl auf Internetseite zugreifen

Empfohlene Antworten

Veröffentlicht

Hallo!

Kann mir jemand einen Tipp geben wie man mit Perl auf einer Internetseite zugreifen kann. Z.B ein Skript das Google öffnet und nach dem Stichwort "Perl" sucht!

vorzugsweise mit libwww-perl (aka LWP).

s'Amstel

Auf den Sourcecode oder die Funktionen?

Bei google gibt es mit sicherheit plugins oder bibliotheken, die man für die suche nutzen kann.

Als kleine Anregung:


$socket = IO::Socket::INET->new(Proto=>"tcp", PeerAddr=>"$host", PeerPort=>"80") or die "Keine Verbindung\n\n";


    print $socket "GET /search?hl=de&q=perl HTTP/1.1\r\n";

    print $socket "Host: www.google.de\r\n";

    print $socket "Accept: */*\r\n";

    print $socket "Connection: close\r\n\n";


usw...

Erstmal danke für die Tipps.

Das Beispiel funktioniert aber nicht. D.h es wird immer "keine Verbindung" angezeigt. Woran könnte das liegen? Vielleicht an den Rechten, oder muss ich die Datei in einem bestimmten Ordner speichern?

hast du denn in $host einen hostnamen drinstehen?

s'Amstel

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.