Part of Slepp's ProjectsPastebinTURLImagebinFilebin
Feedback -- English French German Japanese
Create Upload Newest Tools Donate

Advertising

私の
2008年 2月 3日 日曜日 00:11:25 MDT 

  1. # ali engin musaoglu - ALI ENGIN MUSAOGLU
  2.  
  3. import httplib, urllib, re
  4.  
  5. ss = 0
  6. isim = raw_input("isim : ")
  7. soyisim = raw_input("soyisim : ")
  8. parametre = urllib.urlencode({'sorgu': 'ddl'})
  9.  
  10.  
  11. sehir = ['322-Adana', '416-Ad%FDyaman', '272-Afyon', '472-A%F0r%FD', '382-Aksaray', '358-Amasya', '312-Ankara', '242-Antalya', '478-Ardahan', '466-Artvin', '$
  12.  
  13.  
  14. #sehir = ['322-Adana', '312-Ankara', '242-Antalya', '224-Bursa', '222-Eski%FEehir', '212-%DDstanbul(Avr.)', '216-%DDstanbul(Asy.)', '232-%DDzmir', '422-Malat$
  15. baslik = {'Content-type': 'application/x-www-form-urlencoded', 'Accept': 'text:plain'}
  16. sunucu = 'www.ttrehber.gov.tr'
  17.  
  18. parametre = urllib.urlencode({'sunucu': 'ddl'})
  19.  
  20. cnn = httplib.HTTPConnection(sunucu)
  21. txtkayit=open(isim+' '+soyisim+'.txt','w')
  22.  
  23. for i in range(len(sehir)):
  24.     sayfa = '/trk-wp/IDA2?IDAERROR=&QRY=all&RNG=lequ&CTRY=trk&LANG=tu&PAGE=simpleSearch&LIP=simpleSearch&ACTION=search&STP=S&REQ=20&NAM=' + soyisim + '&STN='$
  25.     cnn.request('POST', sayfa, parametre, baslik)
  26.     cevap = cnn.getresponse()
  27.     str = cevap.read()
  28.  
  29.  
  30.     sablon= re.compile('(bone bulunamad|t fazla kay|orgulama S)', re.IGNORECASE)
  31.     uyanlar= sablon.search(str)
  32.     if uyanlar.group(1) == 'bone bulunamad':
  33.         print sehir[i], 'Abone Bulunamadi'
  34.     elif uyanlar.group(1) == 't fazla kay':
  35.         ss=ss+1
  36.         print sehir[i], 'Fazla Kayit'
  37.         txtkayit.write (isim + ' ' + soyisim + ' ' + sehir[i] + ' ilinde ' + ' FAZLA KAYIT VAR !  \n')
  38.     elif uyanlar.group(1) == 'orgulama S':
  39.         print sehir[i], '- - - - - SONUC VAR - - - - -'
  40.         txtkayit.write (isim + ' ' + soyisim + ' ' + sehir[i] + ' ilinde ' + ' VAR !  \n')
  41.         ss=ss+1
  42. txtkayit.write (ss + ' sehirde ')
  43. cnn.close
  44.  
  45. print ss, ' sehirde '+ isim + ' '+ soyisim + ' var'

advertising

ポストを更新

このポストは更新できる、または、新しいポストを作成

You may also comment on this post.

ペーストの更新
ポストの詳細 (随意)

注目: ペーストのコンテントだけで必要ですが、以下の情報は便利かも知れません。

名前/タイトルを保存する?

(スペースで切る, 随意)



Please note that information posted here will not expire by default. If you do not want it to expire, please set the expiry time above. If it is set to expire, web search engines will not be allowed to index it prior to it expiring. Items that are not marked to expire will be indexable by search engines. Be careful with your passwords. All illegal activities will be reported and any information will be handed over to the authorities, so be good.

comments powered by Disqus