Jump to content

Recommended Posts

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()
uClient.close()
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]]
print(text_nodes)
 


 

Output of text_nodes:

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

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

https://wordpress.org/plugins/participants-database/

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
Link to comment
https://forums.phpfreaks.com/topic/306756-putting-a-set-if-50-urls-into-an-array/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.