View Single Post
Old 11-23-2010, 06:33 AM   #18
siebert
Developer
siebert has a complete set of Star Wars action figures.siebert has a complete set of Star Wars action figures.siebert has a complete set of Star Wars action figures.
 
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"
Ciao,
Steffen
siebert is offline   Reply With Quote