@@ -400,7 +400,7 @@ def extract_rss_results(feed, url=''):
400
400
elif isinstance (content , basestring ):
401
401
content_html = content
402
402
else :
403
- error_reporter . captureMessage ("Content has weird setup" )
403
+ logging . warn ("Content has weird setup" )
404
404
content_html = ''
405
405
406
406
if hasattr (entry , "description" ) and not len (content_html ):
@@ -413,23 +413,27 @@ def extract_rss_results(feed, url=''):
413
413
elif isinstance (content_html , basestring ):
414
414
pass
415
415
else :
416
- print "What the fuck is this type? %s " % type (content_html )
416
+ logging .warn ("What the fuck is this type? %s " % type (content_html ))
417
+
417
418
418
419
bsoup = BeautifulSoup (content_html )
420
+
419
421
html_text = content_html
420
422
if bsoup is not None and len (bsoup .contents ) > 0 :
421
- html_text = "" .join ([c . __unicode__ ( ) for c in bsoup .contents ])
423
+ html_text = "" .join ([unicode ( c ) for c in bsoup .contents ])
422
424
423
425
feed_entry ['content' ] = html_text
424
426
425
427
for attr in entry_attributes :
426
428
if hasattr (entry , attr ):
427
429
val = entry [attr ]
428
430
if val is not None and isinstance (val , basestring ):
429
- bsoup2 = BeautifulSoup (val )
430
- val = "" .join ([c .__unicode__ () for c in bsoup2 .contents ]) if bsoup2 is not None and len (
431
- bsoup2 .contents ) > 0 else val
432
- val = val
431
+ logging .warn (u"{} => {}" .format (attr , val ))
432
+
433
+ #bsoup2 = BeautifulSoup(val)
434
+ #val = "".join([unicode(c) for c in bsoup2.contents]) if bsoup2 is not None and len(
435
+ # bsoup2.contents) > 0 else val
436
+ #val = val
433
437
434
438
feed_entry [attr ] = val
435
439
0 commit comments