create account

[ESP-ENG] Titulos y enlaces en securityparrot || Titles and links in securityparrot by pynomiems

View this thread on: hive.blogpeakd.comecency.com
· @pynomiems ·
$4.52
[ESP-ENG] Titulos y enlaces en securityparrot || Titles and links in securityparrot
<center>
https://i.ibb.co/9Gf96Bh/Preview.png<center>Imagen diseñada con <a href="https://www.canva.com/">canva</a> || Image designed with <a href="https://www.canva.com/">canva</a></sub>
</center>

</center>

<div class="text-justify">

<pre>

import asyncio
import aiohttp
from selectolax.parser import HTMLParser

headers={'user-agent': 'Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10_5_5 rv:3.0; sl-SI) AppleWebKit/534.49.1 (KHTML, like Gecko) Version/4.0.1 Safari/534.49.1'}

async def parsing_page():
    
    async with aiohttp.ClientSession() as session:

        for index in range(1,6): 
            
            async with session.get(f'https://securityparrot.com/category/news/page/{index}/',headers=headers) as page:
                
                securityparrot=await page.text()
                securityparrot_html=HTMLParser(securityparrot)
                 
                for get_hl in  securityparrot_html.css('div.p-content > h3 > a'):
                    h=get_hl.text(strip=True)
                    l=get_hl.attributes['href']
    
                    print(f'headlines: {h} links: {l}')

asyncio.run(parsing_page())

</pre>
    
</div>
    
<center>
    
https://i.ibb.co/cD4ZZ35/Result.png

</center>

https://i.ibb.co/T8PQFRk/Result-II.png

<center>
    
👍  , , , , , , , , , , , , , , , , , , , , , , , , , , ,
properties (23)
authorpynomiems
permlinkesp-eng-titulos-y-enlaces-en-securityparrot-titles-and-links-in-securityparrot
categorysites
json_metadata"{"app": "peakd/2022.11.2", "tags": ["sites", "blogs", "collection"]}"
created2023-01-21 19:42:48
last_update2023-01-21 19:42:48
depth0
children0
last_payout2023-01-28 19:42:48
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value4.516 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length1,280
author_reputation273,261,352,410,025
root_title"[ESP-ENG] Titulos y enlaces en securityparrot || Titles and links in securityparrot"
beneficiaries
0.
accountreward.app
weight10,000
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id120,078,617
net_rshares16,605,030,806,172
author_curate_reward""
vote details (28)