diff options
author | Lionel <lionel.miquel46@gmail.com> | 2018-10-16 16:54:47 +0200 |
---|---|---|
committer | Lionel <lionel.miquel46@gmail.com> | 2018-10-16 16:54:47 +0200 |
commit | 32aa9e84ee635b37f4cff37112e3e62837c914f4 (patch) | |
tree | fb99a3a2d13604fb0fdbae6b5eb80c6412655a25 /randoweb.py | |
parent | 6bf912ba61aee249c344ebbd160df0280748fa9e (diff) | |
download | randopitons-32aa9e84ee635b37f4cff37112e3e62837c914f4.tar.gz randopitons-32aa9e84ee635b37f4cff37112e3e62837c914f4.zip |
YOUPI on a bien mis de l'ordre dans foldercreating.py. On est presque au bout. Certains diront que ce code n'est pas assez modulable et tourné vers l'OOP mais je m'en fous pour l'instant.
Diffstat (limited to 'randoweb.py')
-rw-r--r-- | randoweb.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/randoweb.py b/randoweb.py index 6bc18bb..332bdad 100644 --- a/randoweb.py +++ b/randoweb.py @@ -11,14 +11,13 @@ def randoweb(): post('https://randopitons.re/connexion', data=payload) region = c.get('https://randopitons.re/randonnees/region/'+region) wsite=bs(region) + for i in wsite.find_all('tr'): + randonb.append(i.get("rid")) except SSLError, sslerr: print e.sslerr - - - for i in wsite.find_all('tr'): - randonb.append(i.get("rid")) + try: for i in randonb: |