Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Recipes

Notices

Reply
 
Thread Tools Search this Thread
Old 08-14-2014, 09:35 AM   #1
rainforestking
Junior Member
rainforestking began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Aug 2014
Device: WP8.1
How to capture all articles from a regular url?

I want to download articles from a website,whose url format is something like:
http://coolshell.cn/articles/*.html(* represents numbers),I want to download all the webpages to form a e-book.
by which way can I do this? It would be better to have source code in Python, thanks!
rainforestking is offline   Reply With Quote
Old 08-14-2014, 11:51 AM   #2
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
If there is a webpage somewhere that contains an index of article links, try this: https://www.mobileread.com/forums/sho...d.php?t=244119

(I assume there is no RSS feed? )

If not, assuming you know which range of numbers you need to hit, use a for loop:

Code:
for i in range(startnumber, endnumber):
    url = "http://coolshell.cn/articles/" + $i + ".html"
    '''Download and add the url to your book.'''
eschwartz is offline   Reply With Quote
Advert
Reply

Tags
recipe, regular expression


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
'Articles from Pocket' not showing all articles pharme Kobo Reader 26 02-22-2019 05:59 PM
Feed is titled "all articles" if only one list of articles is found sup Recipes 0 11-30-2013 05:31 PM
Include URL in Pocket articles Kitezh Recipes 5 10-15-2013 10:37 PM
Print friendly url unrelated to regular url (and javascript) sleepless Recipes 3 12-03-2011 10:43 AM


All times are GMT -4. The time now is 06:51 AM.


MobileRead.com is a privately owned, operated and funded community.