Jump to content

putting a set if (50) URLS into an array

Recommended Posts

Posted (edited)

Good day and hello dear experts,

want to add a array where i can store URLs that needed to be fetched


import bs4
from urllib.request im,port urlopen as uReq
from bs4 import BeautifulSoup as soup

my_url = "https://wordpress.org/plugins/participants-database/"
uClient = uReq(my_url)
page_html = uClient.read()
page_soup = soup(page_html, "html.parser")

ttt = page_soup.find("div", {"class":"plugin-meta"})
text_nodes = [node.text.strip() for node in ttt.ul.findChildren('li')[:-1:2]]


Output of text_nodes:

'Version:', 'Active installations: 10,000+', 'Tested up to: 4.9.4']
so far so good

Background: want to fetch the following data from this page:


i need the data of the following three lines - in the above mentioned example


Version: <strong>1.29.3</strong>
Active installations: <strong>100,000+</strong>
Tested up to: <strong>4.9.4</strong>

again: want to add a array where i can store URLs that needed to be fetched

Edited by dil_bert

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.