Bottom Page

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
Quote
#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.
Quote

Top Page

Possibly Related Threads...
Thread Author Replies Views Last Post
  How to clean html content using BeautifulSoup in Python 3.6? PrateekG 5 4,811 Apr-27-2018, 01:14 PM
Last Post: snippsat
  Update records in table liee 1 1,263 Feb-07-2018, 09:59 AM
Last Post: ka06059

Forum Jump:


Users browsing this thread: 1 Guest(s)