|
|
#16 |
|
Developer
![]() ![]() ![]() Posts: 155
Karma: 280
Join Date: Nov 2010
Device: Kindle 3 (Keyboard) 3G / iPad 9 WiFi / Google Pixel 6a (Android)
|
|
|
|
|
|
|
#17 |
|
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,617
Karma: 28549044
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
it's far more semantic and the rest of the conversion pipeline can use the information as appropriate
|
|
|
|
| Advert | |
|
|
|
|
#18 |
|
Developer
![]() ![]() ![]() Posts: 155
Karma: 280
Join Date: Nov 2010
Device: Kindle 3 (Keyboard) 3G / iPad 9 WiFi / Google Pixel 6a (Android)
|
Ok, here is the patch against the latest checked-in version:
Code:
*** brand_eins_orig.recipe Tue Nov 23 08:12:11 2010
--- brand_eins.recipe Tue Nov 23 08:25:53 2010
***************
*** 91,98 ****
latest_jahrgang = soup.findAll('div', attrs={'class': re.compile(r'\bjahrgang-latest\b') })[0].findAll('ul')[0]
pre_latest_issue = latest_jahrgang.findAll('a')[len(latest_jahrgang.findAll('a'))-issue]
url = pre_latest_issue.get('href', False)
! # Get the title for the magazin - build it out of the title of the cover - take the issue and year;
! self.title = "brand eins "+ re.search(r"(?P<date>\d\d\/\d\d\d\d)", pre_latest_issue.find('img').get('title', False)).group('date')
url = 'http://brandeins.de/'+url
# url = "http://www.brandeins.de/archiv/magazin/tierisch.html"
--- 91,100 ----
latest_jahrgang = soup.findAll('div', attrs={'class': re.compile(r'\bjahrgang-latest\b') })[0].findAll('ul')[0]
pre_latest_issue = latest_jahrgang.findAll('a')[len(latest_jahrgang.findAll('a'))-issue]
url = pre_latest_issue.get('href', False)
! # Magazin title
! self.title = "brand eins"
! # Get month and year of the magazine issue - build it out of the title of the cover
! self.timefmt = " " + re.search(r"(?P<date>\d\d\/\d\d\d\d)", pre_latest_issue.find('img').get('title', False)).group('date')
url = 'http://brandeins.de/'+url
# url = "http://www.brandeins.de/archiv/magazin/tierisch.html"
Steffen |
|
|
|
|
|
#19 |
|
Junior Member
![]() Posts: 7
Karma: 10
Join Date: Sep 2010
Device: Kindle
|
I've reverted Steffens changes until further notice.
I have to look in the changes.. sorry for including them so fast. I am in Beijing right now, so I'll look into it as soon as I am back home. @steffen: Sorry for reverting the changes. Lets talk about it as soon as I am back (should be in one week or so )
|
|
|
|
![]() |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| All recipes have Unknown author and title- From source Sept 30 | Starson17 | Calibre | 22 | 10-03-2010 12:38 PM |
| Suggestion: USA recepit have date in title | DBDigital | Calibre | 1 | 06-12-2010 02:33 PM |
| Removing date from periodical title | elmoglick | Calibre | 2 | 06-06-2010 03:18 PM |
| Rename output Title of (custom) news source | ischeriad | Calibre | 4 | 02-16-2010 07:14 AM |
| Date in Title when Fetching News | Nigel H | Calibre | 1 | 01-13-2010 12:57 PM |