[~] Refactor
This commit is contained in:
parent
1bc7838511
commit
fc3f2dc351
@ -4,8 +4,12 @@ import pyquery
|
|||||||
|
|
||||||
|
|
||||||
def kernel_1_sample_scrap():
|
def kernel_1_sample_scrap():
|
||||||
with requests.get(
|
t8 = []
|
||||||
|
for t7 in [
|
||||||
'https://dev.to/kunaal438/media-query-everything-you-need-for-responsive-design-b8g',
|
'https://dev.to/kunaal438/media-query-everything-you-need-for-responsive-design-b8g',
|
||||||
|
]:
|
||||||
|
with requests.get(
|
||||||
|
t7,
|
||||||
) as p:
|
) as p:
|
||||||
t1 = p.content.decode('utf-8')
|
t1 = p.content.decode('utf-8')
|
||||||
t2 = pyquery.PyQuery(t1)
|
t2 = pyquery.PyQuery(t1)
|
||||||
@ -20,12 +24,19 @@ def kernel_1_sample_scrap():
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
pprint.pprint(t3)
|
#pprint.pprint(t3)
|
||||||
pprint.pprint(t6)
|
pprint.pprint(t6)
|
||||||
|
t8.append(
|
||||||
|
dict(
|
||||||
|
article=t7,
|
||||||
|
comments=t6,
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
return dict(
|
return dict(
|
||||||
t1=t1,
|
t1=t1,
|
||||||
t2=t2,
|
t2=t2,
|
||||||
t3=t3,
|
t3=t3,
|
||||||
t6=t6,
|
t6=t6,
|
||||||
|
t8=t8,
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user