Merge pull request #113 from JavanZhu/master
Fix bug that imports cambridge data-src-mp3 failed
This commit is contained in:
commit
8fc39dea6b
@ -1,5 +1,7 @@
|
|||||||
#-*- coding:utf-8 -*-
|
#-*- coding:utf-8 -*-
|
||||||
import os
|
import os
|
||||||
|
import re
|
||||||
|
|
||||||
from ..base import *
|
from ..base import *
|
||||||
|
|
||||||
cambridge_url_base = u'https://dictionary.cambridge.org/'
|
cambridge_url_base = u'https://dictionary.cambridge.org/'
|
||||||
@ -37,7 +39,7 @@ class Cambridge(WebService):
|
|||||||
if not header_found:
|
if not header_found:
|
||||||
header = element.find('div', class_='pos-header')
|
header = element.find('div', class_='pos-header')
|
||||||
if header:
|
if header:
|
||||||
tags = header.find_all('span', class_='pron-info')
|
tags = header.find_all('span', class_=re.compile("uk|us"))
|
||||||
if tags:
|
if tags:
|
||||||
for tag in tags:
|
for tag in tags:
|
||||||
r = tag.find('span', class_='region')
|
r = tag.find('span', class_='region')
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user