just to do some approach to python i have tried to get some data from yahoo .- with the following script ..
note the while look should fit the aim that the data were fetched constantly - guess that this part is working - but i get some errors.
import bs4
import requests
from bs4 import BeautifulSoup
def parsePrice():
r=requests.get('http://finance.yahoo.com/quote/FB?p=FB')
soup=bs4.BeautifulSoup(r.text,"xml")
price=soup.find_all('div',{'class':'My(6px) Post(r) smartphone_Mt(6px)'})[0].find('span').text
return price
while True:
print('the current price_ '+str (parsePrice()))
but there is missing some thing . getting errors all the way - in my ATOM - Editor
Traceback (most recent call last):
File "C:\Users\Kasper\Documents\_f_s_j\_mk_\_dev_\bs\yahoo_finance.py", line 14, in <module>
print('the current price_ '+str (parsePrice()))
File "C:\Users\Kasper\Documents\_f_s_j\_mk_\_dev_\bs\yahoo_finance.py", line 10, in parsePrice
price=soup.find_all('div',{'class':'My(6px) Post(r) smartphone_Mt(6px)'})[0].find('span').text
IndexError: list index out of range
Not such a great deal, Ultimate, which gives you full 5080 features is $181.99 CAD per month, that's $2183.88 per year, I can buy the 5080 for $1809.99 CAD, then it goes up to $279.99 per month after the first billing cycle. Typical cloud rental, costs more than buying the hardware.
Wow, spoken like a true blind hater, you don't even provide arguments. Please, go check my comment above to @seacaptain and you'll find out why what you say doesn't make sense in this context...
Get used to this, with AI tooling now uncovering new vulns and getting them exploitable far faster than has ever been possible before software is going to need to be updated far more frequently.
Back in the day it may take reseachers weeks or months to do what AI can now do in hours.
Once its a threat is discovered it's weaponsized far more quickly, meaning you simply can't be waiting 2, 3, 4 weeks to deploy a patch, it needs to be patched immediately.
Going to be interesting handling this in the enterprise space where traditionally patching has been steady, but very staged (and rightly so up until now), that is going to have to change.
Question
tarifa
hello dear all
just to do some approach to python i have tried to get some data from yahoo .- with the following script ..
note the while look should fit the aim that the data were fetched constantly - guess that this part is working - but i get some errors.
import bs4 import requests from bs4 import BeautifulSoup def parsePrice(): r=requests.get('http://finance.yahoo.com/quote/FB?p=FB') soup=bs4.BeautifulSoup(r.text,"xml") price=soup.find_all('div',{'class':'My(6px) Post(r) smartphone_Mt(6px)'})[0].find('span').text return price while True: print('the current price_ '+str (parsePrice()))but there is missing some thing . getting errors all the way - in my ATOM - Editor
any idea what goes wrong here
Link to comment
https://www.neowin.net/forum/topic/1394470-some-errors-in-a-simple-python-parser-script-that-makes-use-of-bs4/Share on other sites
1 answer to this question
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now