remove useless imports
This commit is contained in:
parent
b8c3501ff5
commit
8de2da49ac
3 changed files with 5 additions and 15 deletions
|
|
@ -19,11 +19,6 @@
|
||||||
|
|
||||||
from __future__ import with_statement
|
from __future__ import with_statement
|
||||||
|
|
||||||
try:
|
|
||||||
import simplejson as json
|
|
||||||
except ImportError:
|
|
||||||
import json
|
|
||||||
|
|
||||||
import re
|
import re
|
||||||
|
|
||||||
from weboob.capabilities.gallery import ICapGallery, BaseGallery, BaseImage
|
from weboob.capabilities.gallery import ICapGallery, BaseGallery, BaseImage
|
||||||
|
|
@ -77,7 +72,7 @@ class MangatoshokanBackend(BaseBackend, ICapGallery):
|
||||||
match = re.match(r'(?:(?:.+mangatoshokan.com/read)?/)?([^/]+(?:/[^/]+)*)', _id)
|
match = re.match(r'(?:(?:.+mangatoshokan.com/read)?/)?([^/]+(?:/[^/]+)*)', _id)
|
||||||
if match is None:
|
if match is None:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
_id = match.group(1)
|
_id = match.group(1)
|
||||||
|
|
||||||
gallery = BaseGallery(_id, url=('http://www.mangatoshokan.com/read/%s' % _id))
|
gallery = BaseGallery(_id, url=('http://www.mangatoshokan.com/read/%s' % _id))
|
||||||
|
|
@ -85,7 +80,7 @@ class MangatoshokanBackend(BaseBackend, ICapGallery):
|
||||||
return gallery
|
return gallery
|
||||||
|
|
||||||
def fill_gallery(self, gallery, fields):
|
def fill_gallery(self, gallery, fields):
|
||||||
gallery.title = gallery.id
|
gallery.title = gallery.id
|
||||||
|
|
||||||
def fill_image(self, image, fields):
|
def fill_image(self, image, fields):
|
||||||
with self.browser:
|
with self.browser:
|
||||||
|
|
|
||||||
|
|
@ -96,7 +96,7 @@ class TopicPage(PhpBBPage):
|
||||||
|
|
||||||
try:
|
try:
|
||||||
url = self.parser.select(self.document.getroot(), 'h2 a', 1).attrib['href']
|
url = self.parser.select(self.document.getroot(), 'h2 a', 1).attrib['href']
|
||||||
except BrokenPageError, e:
|
except BrokenPageError:
|
||||||
url = self.url
|
url = self.url
|
||||||
v = urlsplit(url)
|
v = urlsplit(url)
|
||||||
args = parse_qs(v.query)
|
args = parse_qs(v.query)
|
||||||
|
|
|
||||||
|
|
@ -19,11 +19,6 @@
|
||||||
|
|
||||||
from __future__ import with_statement
|
from __future__ import with_statement
|
||||||
|
|
||||||
try:
|
|
||||||
import simplejson as json
|
|
||||||
except ImportError:
|
|
||||||
import json
|
|
||||||
|
|
||||||
import re
|
import re
|
||||||
|
|
||||||
from weboob.capabilities.gallery import ICapGallery, BaseGallery, BaseImage
|
from weboob.capabilities.gallery import ICapGallery, BaseGallery, BaseImage
|
||||||
|
|
@ -76,7 +71,7 @@ class SimplyreaditBackend(BaseBackend, ICapGallery):
|
||||||
match = re.match(r'(?:(?:.+symplyread.it/reader/read/)?/)?([^/]+(?:/[^/]+)*)', _id)
|
match = re.match(r'(?:(?:.+symplyread.it/reader/read/)?/)?([^/]+(?:/[^/]+)*)', _id)
|
||||||
if match is None:
|
if match is None:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
_id = match.group(1)
|
_id = match.group(1)
|
||||||
|
|
||||||
gallery = BaseGallery(_id, url=('http://www.simplyread.it/reader/read/%s' % _id))
|
gallery = BaseGallery(_id, url=('http://www.simplyread.it/reader/read/%s' % _id))
|
||||||
|
|
@ -84,7 +79,7 @@ class SimplyreaditBackend(BaseBackend, ICapGallery):
|
||||||
return gallery
|
return gallery
|
||||||
|
|
||||||
def fill_gallery(self, gallery, fields):
|
def fill_gallery(self, gallery, fields):
|
||||||
gallery.title = gallery.id
|
gallery.title = gallery.id
|
||||||
|
|
||||||
def fill_image(self, image, fields):
|
def fill_image(self, image, fields):
|
||||||
with self.browser:
|
with self.browser:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue