2012-02-22, 05:45
Hello,
I have looked around to find the exact syntax to do the 'Next Page' but i don't get it. The website im doing plugin for has two types of pagination.
1- It loads from a javascript file, this is the javascript file's link http://static.shahid.mbc.net/statics/js/...ination.js and it says in the javascript file
This is from the website source
2- It's the regular pagination 1,2,3....
this is the paging div from the source
This is my index2 to make it clear where is 2 regular pagination should be
I really appreciate any help!!
Thank you
I have looked around to find the exact syntax to do the 'Next Page' but i don't get it. The website im doing plugin for has two types of pagination.
1- It loads from a javascript file, this is the javascript file's link http://static.shahid.mbc.net/statics/js/...ination.js and it says in the javascript file
Quote:/* Each time the user scrolls the page,
we check to see if they have scrolled all the way down to the footer.
if so we load a new set of content blocks and append them to the list. */
This is from the website source
Quote:<!-- pagination_scroll.js includes-->
<!--<script type="text/javascript" src="http://static.shahid.mbc.net/statics/js/pagination_scroll.js"></script>-->
<script type="text/javascript">
var body_id = 'body';
var num_per_page = 10;
var num_disp_init = 15;
var scroll_loader_id = 'scroll_loader';
var channel_id = 1;
var list_id = 'filtered_list';
var top_marker_id = 'top_marker';
var offset=0;
var count = "161";
</script>
2- It's the regular pagination 1,2,3....
this is the paging div from the source
Quote: <div class='paging'>
<div class="pagination_caption">1 - 10 from 24</div>
<ul name="episode" class="page_ul pagination">
<li class="page_num active"><a href="" title="">1</a></li>
<li class="page_num"><a href="" title="">2</a></li>
<li class="page_num"><a href="" title="">3</a></li>
<li class="next nxt last"><a href="" title="">»</a></li> </ul>
</div>
This is my index2 to make it clear where is 2 regular pagination should be
Quote: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')
data = urllib2.urlopen(req).read()
match=re.compile('</span><a href="(.+?)" title=""><b><img src="(.+?)" alt="" border="0" height="" width="" /><span class="video"></span><span class="duration">(.+?)</span></b><span class="title major"> </span><span class="title">(.+?)</span>').findall(data)
for url,thumbnail,name,duration in match:
addDir(name+' - '+duration,url,3,thumbnail)
I really appreciate any help!!
Thank you