Skip to content

Commit

Permalink
Merge pull request #381 from WangShanpeng/master
Browse files Browse the repository at this point in the history
现有的RSS地址已挂,换回之前的地址;注释掉暂时没用的代码
  • Loading branch information
cdhigh committed Feb 6, 2017
2 parents 781902f + baea975 commit 7258404
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions books/Dapenti.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,11 @@ class Dapenti(BaseFeedBook):
network_timeout = 60
fetch_img_via_ssl = False
feeds = [
(u'喷嚏图卦', 'http://tugua.daoapp.io/rss.xml', True),
(u'喷嚏图卦', 'http://www.pentitugua.com/rss.xml', True),
]

def soupbeforeimage(self, soup):
#更换另一个图库,因为RSS中的图库已经被封
for img in soup.find_all('img', attrs={'src':True}):
if img['src'].startswith('http://ptimg.org:88'):
img['src'] = img['src'].replace('http://ptimg.org:88','http://pic.yupoo.com')

# def soupbeforeimage(self, soup):
# # 更换另一个图库,因为RSS中的图库已经被封
# for img in soup.find_all('img', attrs={'src':True}):
# if img['src'].startswith('http://ptimg.org:88'):
# img['src'] = img['src'].replace('http://ptimg.org:88','http://pic.yupoo.com')

0 comments on commit 7258404

Please sign in to comment.