(Nov-14-2021, 10:55 AM)snippsat Wrote: A more normal way is to web-scrape the info you want.
Example.
import requests from bs4 import BeautifulSoup url = 'https://gpac.wp.imt.fr/downloads/' response = requests.get(url) soup = BeautifulSoup(response.content, 'lxml') print(soup.select_one('#post-147 > div > p:nth-child(3)').text) # Just version version = soup.select_one('#post-147 > div > p:nth-child(3) > strong').text print(version)This info
Output:The current GPAC release is 1.0.1 (released in September 2020). 1.0.1#post-147 > div > p:nth-child(3)
can just copy from Browser right clickcopy selector
.
Then in BS use the CSS selector way withselect
orselect_one
.
Okay yeah that work's thanks.
I haven't understood how I can do it for other sites tho. For another example, how do I get the information for this site: https://www.makemkv.com/download/
Do I need to find out what CSS part I'm looking for using a browser?
Edit: Alright I got it (sorry getting it so late). My output is "#content > ul:nth-child(3) > li > a" and it prints "MakeMKV 1.16.5 for Windows". How do i cut it to only show the video? I didn't understand that in your part