(text)
| 208 | |
| 209 | |
| 210 | def select_rootdomain(text): |
| 211 | dms = text.split('.') |
| 212 | if len(dms) == 2: |
| 213 | return text |
| 214 | if dms[-2] in top_sufix and dms[-1] in country_sufix: |
| 215 | root = "{0}.{1}.{2}".format(dms[-3],dms[-2],dms[-1]) |
| 216 | return root |
| 217 | if dms[-1] in top_sufix or dms[-1] in country_sufix: |
| 218 | root = "{0}.{1}".format(dms[-2],dms[-1]) |
| 219 | return root |
| 220 | |
| 221 | |
| 222 | def select_urls(view, path=False): |