Small style fixes
This commit is contained in:
parent
c098ac32bc
commit
5dd0e9e0ec
1 changed files with 4 additions and 3 deletions
|
|
@ -23,11 +23,12 @@ try:
|
||||||
from urllib.parse import unquote
|
from urllib.parse import unquote
|
||||||
except ImportError:
|
except ImportError:
|
||||||
from urllib import unquote
|
from urllib import unquote
|
||||||
import requests
|
|
||||||
import re
|
import re
|
||||||
import sys
|
import sys
|
||||||
from copy import deepcopy
|
from copy import deepcopy
|
||||||
from io import BytesIO
|
from io import BytesIO
|
||||||
|
|
||||||
|
import requests
|
||||||
import lxml.html as html
|
import lxml.html as html
|
||||||
import lxml.etree as etree
|
import lxml.etree as etree
|
||||||
|
|
||||||
|
|
@ -374,7 +375,7 @@ def pagination(func):
|
||||||
['One', 'Two', 'Three', 'Four']
|
['One', 'Two', 'Three', 'Four']
|
||||||
"""
|
"""
|
||||||
def inner(page, *args, **kwargs):
|
def inner(page, *args, **kwargs):
|
||||||
while 1:
|
while True:
|
||||||
try:
|
try:
|
||||||
for r in func(page, *args, **kwargs):
|
for r in func(page, *args, **kwargs):
|
||||||
yield r
|
yield r
|
||||||
|
|
@ -479,7 +480,7 @@ class Form(OrderedDict):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
try:
|
try:
|
||||||
if inp.attrib['type'] in ('checkbox', 'radio') and not 'checked' in inp.attrib:
|
if inp.attrib['type'] in ('checkbox', 'radio') and 'checked' not in inp.attrib:
|
||||||
continue
|
continue
|
||||||
except KeyError:
|
except KeyError:
|
||||||
pass
|
pass
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue