Exemple #1
0
    def _fetch_next_page(prev_link, content):
        match = re.search(r'<a href="(?P<next>[^">]*)".*?>Next', content)
        next_link = match.group('next') if match else ''
        if next_link:
            next_link = patch_url(prev_link, next_link)

        return next_link
Exemple #2
0
    def _fetch_next_page(prev_link, content):
        match = re.search(r'<a href="(?P<next>[^">]*)">(?:下一页|Next)', content)
        next_link = match.group("next") if match else ""
        if next_link:
            next_link = patch_url(prev_link, next_link)

        return next_link
Exemple #3
0
    def _fetch_next_page(prev_link, content):
        match = re.search(r'<a href="(?P<next>[^">]*)".*?>Next', content)
        next_link = match.group('next') if match else ''
        if next_link:
            next_link = patch_url(prev_link, next_link)

        return next_link
Exemple #4
0
    def _fetch_next_page(prev_link, content):
        pattern = r'<a class="pn" href="(?P<next>[^"]*)" id="pnnext"'
        match = re.search(pattern, content)
        next_link = match.group('next') if match else ''
        if next_link:
            next_link = patch_url(prev_link, next_link)

        return next_link
Exemple #5
0
    def _fetch_next_page(prev_link, content):
        q = urlparse.urlparse(prev_link).query
        d = query2dict(q)
        prev_page = d.get('page', '')
        if prev_page:
            match = re.search(r'<a href=(?P<next>[^">]*)>' + str(int(prev_page)+1) + r'</a>', content)
            next_link = match.group('next') if match else ''
            next_link = patch_url(prev_link, next_link)
        else:
            next_link = ''

        return next_link
Exemple #6
0
    def _fetch_next_page(prev_link, content):
        q = urlparse.urlparse(prev_link).query
        d = query2dict(q)
        prev_page = d.get('page', '')
        if prev_page:
            match = re.search(
                r'<a href=(?P<next>[^">]*)>' + str(int(prev_page) + 1) +
                r'</a>', content)
            next_link = match.group('next') if match else ''
            next_link = patch_url(prev_link, next_link)
        else:
            next_link = ''

        return next_link
Exemple #7
0
    def _fetch_next_page(prev_link, content):
        match = re.search(r'<a href="(?P<next>[^"]*)" class="n">下一页', content)
        next_link = match.group('next') if match else ''
        next_link = patch_url(prev_link, next_link)

        return next_link