View Single Post
Old 04-16-2015, 02:20 PM   #16
hegi
Enthusiast
hegi began at the beginning.
 
Posts: 44
Karma: 10
Join Date: Dec 2012
Device: Kindle 4 & Kindle PW 3G
Wirtschaftswoche Title Image broken since a while

Hey ho,

the code snippet to get the title image for Wirtschaftswoche is currently:

Code:
    cover_source          = 'http://www.wiwo-shop.de/wirtschaftswoche/wirtschaftswoche-emagazin-p1952.html'
[...]

    def get_cover_url(self):
       cover_source_soup = self.index_to_soup(self.cover_source)
       preview_image_div = cover_source_soup.find(attrs={'class':'container vorschau'})
       return 'http://www.wiwo-shop.de'+preview_image_div.a.img['src']
However, they changed the site quite a bit. I have now two choices to gather this image from the web. Either I get it from this bit of http:

(from: https://kaufhaus.handelsblatt.com/do...zin-p1952.html)
Code:
			<div class="carousel-inner">
				<figure class="active item">
					<img src="https://kdww.cekom.de/images/lrn/spacer.gif" style="background: transparent url(https://kdww.cekom.de/images//WW_titel_16-w454-h298-ar.jpg) center center no-repeat;" title="WirtschaftsWoche eMagazin" alt="WirtschaftsWoche eMagazin">
									</figure>
							</div>
This would be: https://kdww.cekom.de/images//WW_titel_16-w454-h298-ar.jpg

or alternatively I take this:

(from: http://www.wiwo.de)
Code:
<div data-vr-zone="Das Aktuelle Heft" class="hcf-mcol-box"><div class="hcf-content hcf-mcol-box-content hcf-decorated-box"><div class="hcf-morewiwo-content" data-vr-contentbox=""><div class="hcf-wiwo-image"><a title="Wirtschaftswoche" target="_blank" href="http://abo.wiwo.de/"><img border="0" alt="Wirtschaftswoche" src="http://www.wiwo.de/images/wirtschaftswoche-cover-16-2015/10019036/46-formatOriginal.gif"/></a></div><div class="hcf-recent-wiwo"><h4 class="hcf-teaser-text">WirtschaftsWoche 16 vom 13.4.2015</h4>
Then I would need this: http://www.wiwo.de/images/wirtschaft...atOriginal.gif


I would prefer the first source (slightly better resolution). However, ... in both cases I fail to make the neccessary adaptions to the soup section. Has anyone a hot tip for me?

Thanks

Hegi.
hegi is offline   Reply With Quote