2015-01-09 14:11:21 +03:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
import sys
|
2015-03-19 23:29:04 +03:00
|
|
|
import os, json, re
|
|
|
|
from BeautifulSoup import BeautifulSoup
|
2015-01-09 14:11:21 +03:00
|
|
|
|
|
|
|
ROOT = os.path.dirname(sys.modules["__main__"].sys.argv[0])
|
|
|
|
searcherObject = {}
|
2015-01-31 23:28:30 +03:00
|
|
|
searcher = 'KickAssSo'
|
2015-01-09 14:11:21 +03:00
|
|
|
if ROOT + os.sep + 'resources' + os.sep + 'contenters' not in sys.path:
|
|
|
|
sys.path.insert(0, ROOT + os.sep + 'resources' + os.sep + 'contenters')
|
|
|
|
searcherObject[searcher] = getattr(__import__(searcher), searcher)()
|
|
|
|
|
2015-03-19 23:29:04 +03:00
|
|
|
#print str(searcherObject[searcher].get_info('http://kickass.so/greys-anatomy-s11e09-hdtv-x264-lol-ettv-t10144556.html'))
|
2015-01-15 22:53:23 +03:00
|
|
|
|
2015-03-19 23:29:04 +03:00
|
|
|
|
|
|
|
x='<a href="http://swesub.tv/action/">Action</a></li><li><a href="http://swesub.tv/animerat/">Animerat</a></li><li><a href="http://swesub.tv/dans/">Dans</a></li><li><a href="http://swesub.tv/dokumentar/">Dokumentär</a></li><li><a href="http://swesub.tv/drama/">Drama</a></li><li><a href="http://swesub.tv/familj/">Familj</a></li><li><a href="http://swesub.tv/fantasy/">Fantasy</a></li><li><a href="http://swesub.tv/komedi/">Komedi</a></li><li><a href="http://swesub.tv/krig/">Krig</a></li><li><a href="http://swesub.tv/kriminal/">Kriminal</a></li><li><a href="http://swesub.tv/musikal/">Musikal</a></li><li><a href="http://swesub.tv/romantik/">Romantik</a></li><li><a href="http://swesub.tv/sci-fi/">Sci-Fi</a></li><li><a href="http://swesub.tv/skrack/">Skräck</a></li><li><a href="http://swesub.tv/sport/">Sport</a></li><li><a href="http://swesub.tv/thriller/">Thriller</a></li><li><a href="http://swesub.tv/western/">Western</a></li><li><a href="http://swesub.tv/aventyr/">Äventyr</a></li>'
|
|
|
|
y='href="http://swesub.tv/(.+?)/">(.+?)<'
|
|
|
|
for u,t in re.findall(y,x):
|
|
|
|
#print ", '/"+u+"/', {'page': '/"+u+"/?page=%d', 'increase': 1, 'second_page': 2,}),"
|
|
|
|
print t
|