Message from Python discussions
November 2018
— Run it locally
True David. But this bot will fetch stock prices and wanted to share with general user community and hence was looking for option of serverless and keeping my pc on (24x7)
— Hi
— Then do some reserarch, is not python related, so its offtopic
— Thanks.
— Please help me
— Q to all? Dear friends, some code for rew:
from urllib.request import urlopen
from bs4 import BeautifulSoup
try:
html=urlopen("https://www.xxxx.loc/search/44fz")
except HTTPError as e:
print(e)
print("error 404/Contact to Admin!")
if html is None:
print("resource does not ex-t. Check URL")
else:
bsObj=BeautifulSoup(html,'html.parser')
priceList=bsObj.findAll("div", {"class":"w-price-b"})
for child in bsObj.find("div", {"class":"w-price-b"}).children:
print(child)
code does not group numerics params of cost
— >>>from urllib.request import urlopen
>>>from bs4 import BeautifulSoup
>>> try:
>>> html=urlopen("https://www.xxxx.loc/search/44fz")
>>> except HTTPError as e:
>>> print(e)
>>> print("error 404/Contact to Admin!")
>>> if html is None:
>>> print("resource does not ex-t. Check URL")
>>> else:
>>> bsObj=BeautifulSoup(html,'html.parser')
>>> priceList=bsObj.findAll("div", {"class":"w-price-b"})
>>> for child in bsObj.find("div", {"class":"w-price-b"}).children:
>>> print(child)
— Please stop spamming your code, see the rules
— Sorry
— There is a devops channel…
— Is there? can you share it in PM please?