Python Forum
beautifulsoup :: possible to rssify content - of let us say 10 or 20 last records!?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
beautifulsoup :: possible to rssify content - of let us say 10 or 20 last records!?
#1
hello dear python-experts,


i am fairly new to python know a little the parser and have heard bout beautiful soup

i want to gather some information from this site:

https://europa.eu/youth/volunteering/org...ns_en#open


is this possible to rssify content - of let us say 10 or 20 last records!?

i need an approach..

love to hear from you

apollo
Wordpress - super toolkits a. http://wpgear.org/ :: und b. https://github.com/miziomon/awesome-wordpress :: Awesome WordPress: A curated list of amazingly awesome WordPress resources and awesome python things https://github.com/vinta/awesome-python
Reply
#2
Look at Web-Scraping part-1 and part-2
Then you should try yourself,here a start with some hints.
import requests
from bs4 import BeautifulSoup

url = 'https://europa.eu/youth/volunteering/organisations_en#open'
response = requests.get(url)
soup = BeautifulSoup(response.content, 'lxml')
print(soup.find('title').text)
block = soup.find('div', class_="eyp-card block-is-flex")
Test usage,site have blocks with info,here some on first block.
European Youth Portal
>>> block.a
<a href="/youth/volunteering/organisation/48592_en" target="_blank">"Academy for Peace and Development" Union</a>
>>> block.a.text
'"Academy for Peace and Development" Union'

>>> block.select_one('div > div > p:nth-child(9)')
<p><strong>PIC:</strong> 948417016</p>
>>> block.select_one('div > div > p:nth-child(9)').text
'PIC: 948417016' 
apollo Wrote:is this possible to rssify content - of let us say 10 or 20 last records!?
RSS is a kind of XML very close,so can use parsed content or HTML tag to make it.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  BeautifulSoup: 6k records - but stops after parsing 20 lines apollo 0 1,804 May-10-2021, 05:08 PM
Last Post: apollo
  How to clean html content using BeautifulSoup in Python 3.6? PrateekG 5 10,326 Apr-27-2018, 01:14 PM
Last Post: snippsat

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020