2012-01-30, 02:48
Hello guys,
Im doing VOD plugin of a website that has few channels, but im facing a problem I couldn't solve it in 2 days, which is the plugin can't jump from index to index2 or other meaning mode==1 to mode==2.
Let me give more details, to make it clear.
So when i open the plugin it shows the CATEGORIES() for example ChannelOne,Two..etc, when i click on any of the channels, it shows the list of the TvShows, accidentally they have the same match, then when i click on any of the TvShow's name it will NOT jump to the list of TvShow's Episodes.
ChannelOne>>Series List>>Episodes , I can't jump from Series List to Episodes
this is INDEX it list the Channels and the TVShows
The INDEX2 that i have problem with will not jump to the Episodes , or can't call the INDEX above.:confused2:
Here is the Mode
Hope I explained it clear.
Please Can someone shows what im doing wrong.
Im doing VOD plugin of a website that has few channels, but im facing a problem I couldn't solve it in 2 days, which is the plugin can't jump from index to index2 or other meaning mode==1 to mode==2.
Let me give more details, to make it clear.
So when i open the plugin it shows the CATEGORIES() for example ChannelOne,Two..etc, when i click on any of the channels, it shows the list of the TvShows, accidentally they have the same match, then when i click on any of the TvShow's name it will NOT jump to the list of TvShow's Episodes.
ChannelOne>>Series List>>Episodes , I can't jump from Series List to Episodes
Code:
def CATEGORIES():
addDir("ChannelOne","",1,"")
addDir( "ChannelTwo","",1,"")
addDir( "ChannelThree","",1,"")
this is INDEX it list the Channels and the TVShows
Code:
def INDEX(url):
req = urllib2.Request(url)
req.add_header('User-Agent', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3')
response = urllib2.urlopen(req)
link=response.read()
response.close()
match=re.compile('href="(.+?)" title=""><b><img src="(.+?)" width="" height="" border="0" alt="" /></b><span class=".+?">(.+?)</span>').findall(link)
for url,thumbnail,name in match:
addDir(name,url,1,thumbnail)
The INDEX2 that i have problem with will not jump to the Episodes , or can't call the INDEX above.:confused2:
Code:
def INDEX2(url):
req = urllib2.Request(url)
req.add_header('User-Agent', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3')
response = urllib2.urlopen(req)
link=response.read()
response.close()
match=re.compile('</span><a href="(.+?)" title=""><b><img src="(.+?)" alt="" border="0" height="" width="" /><span class=".+?"></span><span class=".+?">.+?</span></b><span class=".+?"> </span><span class=".+?">.+?</span><span class=".+?">(.+?)</span>').findall(link)
for url,thumbnail,name in match:
addDir(name,url,2,thumbnail)
Here is the Mode
Code:
if mode==None or url==None or len(url)<1:
print ""
CATEGORIES()
elif mode==1:
print ""+url
INDEX(url)
elif mode==2:
print ""+url
INDEX2(url)
elif mode==3:
print ""+url
VIDEOLINKS(url,name)
Hope I explained it clear.
Please Can someone shows what im doing wrong.