mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix ESPN soccernet feed
This commit is contained in:
parent
a28e0b6f1d
commit
50ad3d9136
@ -41,7 +41,8 @@ class ESPN(BasicNewsRecipe):
|
|||||||
'''
|
'''
|
||||||
|
|
||||||
|
|
||||||
feeds = [('Top Headlines', 'http://sports.espn.go.com/espn/rss/news'),
|
feeds = [
|
||||||
|
('Top Headlines', 'http://sports.espn.go.com/espn/rss/news'),
|
||||||
'http://sports.espn.go.com/espn/rss/nfl/news',
|
'http://sports.espn.go.com/espn/rss/nfl/news',
|
||||||
'http://sports.espn.go.com/espn/rss/nba/news',
|
'http://sports.espn.go.com/espn/rss/nba/news',
|
||||||
'http://sports.espn.go.com/espn/rss/mlb/news',
|
'http://sports.espn.go.com/espn/rss/mlb/news',
|
||||||
@ -107,10 +108,11 @@ class ESPN(BasicNewsRecipe):
|
|||||||
if match and 'soccernet' not in url and 'bassmaster' not in url:
|
if match and 'soccernet' not in url and 'bassmaster' not in url:
|
||||||
return 'http://sports.espn.go.com/espn/print?'+match.group(1)+'&type=story'
|
return 'http://sports.espn.go.com/espn/print?'+match.group(1)+'&type=story'
|
||||||
else:
|
else:
|
||||||
if match and 'soccernet' in url:
|
if 'soccernet' in url:
|
||||||
splitlist = url.split("&", 5)
|
match = re.search(r'/id/(\d+)/', url)
|
||||||
newurl = 'http://soccernet.espn.go.com/print?'+match.group(1)+'&type=story' + '&' + str(splitlist[2] )
|
if match:
|
||||||
return newurl
|
return \
|
||||||
|
'http://soccernet.espn.go.com/print?id=%s&type=story' % match.group(1)
|
||||||
#else:
|
#else:
|
||||||
# if 'bassmaster' in url:
|
# if 'bassmaster' in url:
|
||||||
# return url
|
# return url
|
||||||
|
Loading…
x
Reference in New Issue
Block a user