🐪 SQLAddToDB.pl (Perl)                                    2.8 KB                    2006-11-17                
                                         Perl module for SQLAddToDB
                             1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52  | #!/usr/bin/perl
require "functions.pl";
use DBI();
$drh			= DBI->install_driver("mysql");
my $DBHOST		= "localhost";
my $DBNAME		= "zoozle";
my $DBUSER		= "zoozle";	
my $DBPASS		= "zoozle23!99";	
my $dbh			= DBI->connect("DBI:mysql:database=$DBNAME;host=$DBHOST", "$DBUSER", "$DBPASS", {'RaiseError' => 0});
my $AddFile = $ARGV[0];
&add_content_toSQLDB($AddFile);
&add_content_toREALSQLDB($AddFile);
$dbh->disconnect;
sub add_content_toSQLDB() {
	my $filename	= shift;
	my $date		= &getDATE();
	open(RH1,"<$filename") or die "$! - $filename \n";
	foreach (<RH1>) {
		
		my ( $cat, $desc, $link ) = split('#', $_);
		$link =~ s/LINK=//;
		$desc =~ s/DESC=//;
		$cat =~ s/CATE=//;
		
		next if ( $_ !~ /^CATE=/ );
		next if ( $_ =~ /Torrent does not exist/ig );
		next if ( $link =~ /megawerbung/);
		next if ( $desc =~ /<img/ig );
		
		$cat	= &deleteSpecialChars($cat);
		$desc	= &deleteSpecialChars($desc);
		$count++;
		$desc =~ s/&+(\w)+;/ /i;
		$desc =~ s/&#+(\w)+;/ /i;
		$desc =~ s/&+(\d)+;/ /i;
		$desc =~ s/&#+(\d)+;/ /i;
... [truncated, 90 more lines] ...
 | 
 
                                         {
    "@context": "https://schema.org",
    "@type": "SoftwareSourceCode",
    "name": "SQLAddToDB.pl",
    "description": "Perl module for SQLAddToDB",
    "dateModified": "2006-11-17",
    "dateCreated": "2025-03-23",
    "contentSize": "2.8 KB",
    "contentUrl": "https://www.artikelschreiber.com/opensource/torrentindexer/torrentgrabber/SQLAddToDB.pl",
    "encodingFormat": "text/x-perl",
    "programmingLanguage": {
        "@type": "ComputerLanguage",
        "name": "Perl"
    },
    "codeRepository": "https://www.artikelschreiber.com/opensource/torrentindexer/torrentgrabber/"
}            
                                             🐪 fenopygrabber.pl (Perl)                                    2.7 KB                    2006-11-17                
                                         Perl module for fenopygrabber
                             1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52  | #!/usr/bin/perl -Imodules
use IO::Handle;
# SELECT * FROM `torrent7` WHERE `LINK` LIKE ('http://fenopy.com%')
my $CatLanguage = "en";
my $StartUrl	= "http://fenopy.com/";
my (undef,undef,$Hostname,undef) = split('/', $StartUrl);
my $CachePath				= "/root/zoozle/indexer/torrentindexer/cache";
my $TorrentStoreFlatFile	= "$CachePath/$Hostname-torrent.txt";
my $LinkScannedFile			= "$CachePath/$Hostname-alreadyscannedlinks.txt"; 
my $LinksToScan				= "$CachePath/$Hostname-linksToScan.txt"; 
my $TorrentPath			= "/root/zoozle/indexer/torrentindexer/torrentgrabber/torrents";		# later check if dir exits if not create, siehe client.pm easyspider
my $FinalTorrentFile	= "$TorrentPath/$Hostname-finaltorrents.txt";
mkdir $TorrentPath;
open(TORRENT,">$FinalTorrentFile") or die;
	TORRENT->autoflush(1);
	TORRENT->blocking(0);
	binmode TORRENT, ":utf8";
	flock(TORRENT, 2);
open(RH,"<$LinksToScan") or die;
	while(<RH>){
		my ( $LinkDesc, $ParentLink, $LinkName ) = split(' ### ', $_);
		
	#	if ( $ParentLink =~ /http:\/\/fenopy.com\/torrent\//i ) {
	#		print "LinkDesc: $LinkDesc\n";
	#		print "Linkname: $ParentLink\n";
	#		print "\n\n";
	#		sleep 1;
	#	};
		# CATE=en#DESC=Read or Die - OVA (GermanDub)#LINK=http://www.mininova.org/tor/471390
		if ( $LinkName =~ /http:\/\/fenopy.com\/torrent\//i ) {
			
			if ( $LinkDesc =~ /\[img\]/i) {
				my (undef,undef,undef,undef, $Raw,undef,undef) = split('/', $LinkName);
				#print "LinkDesc: " . chomp(delteSpecialChars($Raw)) . "\n";
				my $DESC = &delteSpecialChars($Raw);
				chomp($DESC); chomp($LinkName);
				$DESC =~ s/#\s//;
				print TORRENT "CATE=en#DESC=$DESC#LINK=$LinkName\n" if ( $LinkName =~ /index\.html/i );
				$count++ if ( $LinkName =~ /index\.html/i );
... [truncated, 49 more lines] ...
 | 
 
                                         {
    "@context": "https://schema.org",
    "@type": "SoftwareSourceCode",
    "name": "fenopygrabber.pl",
    "description": "Perl module for fenopygrabber",
    "dateModified": "2006-11-17",
    "dateCreated": "2025-03-23",
    "contentSize": "2.7 KB",
    "contentUrl": "https://www.artikelschreiber.com/opensource/torrentindexer/torrentgrabber/fenopygrabber.pl",
    "encodingFormat": "text/x-perl",
    "programmingLanguage": {
        "@type": "ComputerLanguage",
        "name": "Perl"
    },
    "codeRepository": "https://www.artikelschreiber.com/opensource/torrentindexer/torrentgrabber/"
}            
                                             🐪 functions.pl (Perl)                                    7.9 KB                    2006-10-22                
                                         Perl module for functions
                             1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52  | #!/usr/bin/perl
use LWP::UserAgent;
use HTTP::Cookies;
use HTTP::Request;
use Tie::File;
$PROXYTMP	= "proxy.tmp.txt";
$PROXYGO	= "proxy.working.txt";
$TESTURL	= "http://www.zoozle.net/zoozle/information.html";
$UA			= "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; YPC 3.0.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)";
############# Subroutine zum erstellen eines HTTP Requestes:Start
# Aufgabe: &http_get - erstelle und sende http request an bergebene url
# Rckgabe: content der angefragten uri/url
sub http_get() {
	
	my ($url, $timeout, $useragent, $proxy) = @_;
	my $UA = LWP::UserAgent->new( keep_alive => 1 );
	$UA->agent($useragent);
	$UA->timeout($timeout);
	$UA->max_size(950_000);
	#$UA->proxy(["http"], "http://$proxy") if ($proxy ne '');
  
	my $jar_jar = HTTP::Cookies->new
		(file => ".Cookies" || ".Cookies.txt",
			autosave => 1,
			max_cookie_size => 40960,
			max_cookies_per_domain => 10000, );
			$UA->cookie_jar($jar_jar );
		
	my $req = HTTP::Request->new(GET => $url);
	
	# Pass request to the user agent and get a response back
  	
	$req->referer($url);
	
	my $res = $UA->request($req);
	if ($res->is_success) {
		return $res->content;
  	} else {
      	#return "<html><body> Spider::Easyspider::http_get(): " . $res->status_line . "</body></html>";
		return 0;
  	};
}; # sub http_get {}
############# Subroutine zum erstellen eines HTTP Requestes:Ende
... [truncated, 253 more lines] ...
 | 
 
                                         {
    "@context": "https://schema.org",
    "@type": "SoftwareSourceCode",
    "name": "functions.pl",
    "description": "Perl module for functions",
    "dateModified": "2006-10-22",
    "dateCreated": "2025-03-23",
    "contentSize": "7.9 KB",
    "contentUrl": "https://www.artikelschreiber.com/opensource/torrentindexer/torrentgrabber/functions.pl",
    "encodingFormat": "text/x-perl",
    "programmingLanguage": {
        "@type": "ComputerLanguage",
        "name": "Perl"
    },
    "codeRepository": "https://www.artikelschreiber.com/opensource/torrentindexer/torrentgrabber/"
}            
                                             🐪 torrenttograbber.pl (Perl)                                    4.0 KB                    2006-11-17                
                                         Perl module for torrenttograbber
                             1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52  | #!/usr/bin/perl -Imodules
use IO::Handle;
# SELECT * FROM `torrent7` WHERE `LINK` LIKE ('http://fenopy.com%')
my $CatLanguage = "de";
my $StartUrl = "http://torrent.to/";
my (undef,undef,$Hostname,undef) = split('/', $StartUrl);
my $CachePath				= "/root/zoozle/indexer/torrentindexer/cache";
my $TorrentStoreFlatFile	= "$CachePath/$Hostname-torrent.txt";
my $LinkScannedFile			= "$CachePath/$Hostname-alreadyscannedlinks.txt"; 
my $LinksToScan				= "$CachePath/$Hostname-linksToScan.txt"; 
my $TorrentPath			= "/root/zoozle/indexer/torrentindexer/torrentgrabber/torrents";		# later check if dir exits if not create, siehe client.pm easyspider
my $FinalTorrentFile	= "$TorrentPath/$Hostname-finaltorrents.txt";
mkdir $TorrentPath;
open(TORRENT,">$FinalTorrentFile") or die;
	TORRENT->autoflush(1);
	TORRENT->blocking(0);
	binmode TORRENT, ":utf8";
	flock(TORRENT, 2);
open(RH,"<$LinksToScan") or die;
	while(<RH>){
		my ( $LinkDesc, $ParentLink, $LinkName ) = split(' ### ', $_);
		
		# http://torrent.to/torrent/upload/moviez/539/154539/555-www.torrent.to...DasLebendesBrian.torrent
		# if ( $LinkName =~ /http:\/\/torrent\.to\/torrent\/upload\//i && $LinkName =~ /(\w)+\.torrent/i ) {
		# my $Reverse = reverse($LinkName);
		# if ( $Reverse =~ /^tnerrot\./i ) {
		
		if ( $LinkName =~ /http:\/\/torrent\.to\/torrent\/upload\//i && $LinkName =~ /(\w)+\.torrent/i ) {
			
			my $Raw;
			my ( undef, $Raw) = split('\.\.\.', $LinkName);
			$Raw =~ s/\.torrent//gi;
			
			$Raw =~ s/\d+-+\d+-//ig;
			$Raw =~ s/^\.//og; $Raw =~ s/^\.//og; $Raw =~ s/^\.//og; $Raw =~ s/^\.//og; $Raw =~ s/^\.//og;
			my @FileName = split('', $Raw);
			my $FileNameCount = 0;
			my $output;
... [truncated, 96 more lines] ...
 | 
 
                                         {
    "@context": "https://schema.org",
    "@type": "SoftwareSourceCode",
    "name": "torrenttograbber.pl",
    "description": "Perl module for torrenttograbber",
    "dateModified": "2006-11-17",
    "dateCreated": "2025-03-23",
    "contentSize": "4.0 KB",
    "contentUrl": "https://www.artikelschreiber.com/opensource/torrentindexer/torrentgrabber/torrenttograbber.pl",
    "encodingFormat": "text/x-perl",
    "programmingLanguage": {
        "@type": "ComputerLanguage",
        "name": "Perl"
    },
    "codeRepository": "https://www.artikelschreiber.com/opensource/torrentindexer/torrentgrabber/"
}