Platon Technologies
neprihlásený Prihlásiť Registrácia
SlovakEnglish
open source software development oslavujeme 10 rokov vývoja otvoreného softvéru! Pondelok, 23. jún 2025

Súbor: [Platon] / scripts / shell / zoznamka-fun / get-ids.sh (stiahnutie)

Revízia 1.2, Tue Jul 15 18:58:56 2003 UTC (21 years, 11 months ago) by nepto


Zmeny od 1.1: +38 -6 [lines]

Updated:
    - conforming changes on Zoznamka.SK
    - more robust
    - headers update

#!/bin/sh

#
# get-ids.sh - extract all IDs of advertisements
#
# Developed by Ondrej Jombik <nepto@platon.sk>
# Copyright (c) 2003 Platon SDG, http://platon.sk/
# Licensed under terms of GNU General Public License.
# All rights reserved.
#
# Changelog:
# 11/03/2002 - created
# 15/07/2003 - updated
#

# $Platon: get-ids.sh,v 1.1 2002/03/11 14:46:39 jombik9 Exp $

DEBUG=''; # '1' for debugging, '' otherwise

categories=`lynx -dump www.zoznamka.sk \
    | awk 'BEGIN {FS="="} /inzeraty\.phtml.*kat/ {print $3}' \
    | sed 's/&.*$//g'`

if [ "$DEBUG" ]; then
    echo "Categories:";
    echo "-----------";
    echo "$categories";
fi

if [ "X" = "X$categories" ]; then
    echo "no categories found";
    exit;
fi

(    for cat in $categories; do
        for st in `seq 10`; do
            s="http://zoznamka.azet.sk/inzeraty.phtml?&kat=$cat&all=1&tv=j&st=$st";
            lynx -dump -noreferer "$s";
            if [ "$DEBUG" ]; then
                echo "[$s]";
            fi
        done
    done ) \
    | perl -wne '/c_inz=(\d*)[^\d]/ && print "$1\n";' \
    | uniq


Platon Group <platon@platon.sk> http://platon.sk/
Copyright © 2002-2006 Platon Group
Stránka používa redakčný systém Metafox
Na začiatok