[~] Refactor
This commit is contained in:
parent
85876a299c
commit
f4c5537eb1
@ -9,11 +9,21 @@ def kernel_1_sample_scrap():
|
||||
) as p:
|
||||
t1 = p.content.decode('utf-8')
|
||||
t2 = pyquery.PyQuery(t1)
|
||||
t3 = t2('.comment_content')
|
||||
t3 = t2('.comment__content')
|
||||
t6 = []
|
||||
for o in t3:
|
||||
t4 = pyquery.PyQUery(o)
|
||||
t5 = t4('.comment__header > a').attr['href']
|
||||
t6.append(
|
||||
author=t5,
|
||||
)
|
||||
|
||||
pprint.pprint(t3)
|
||||
pprint.pprint(t6)
|
||||
|
||||
return dict(
|
||||
t1=t1,
|
||||
t2=t2,
|
||||
t3=t3,
|
||||
t6=t6,
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user