Message from Python discussions
November 2018
— 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?
— Can i send a code to correct me pls
— Pls share
— See rules
— Ok david i am trying to learn an needed some help sorry
— I mean, you can share your code but following the rules, never said "dont share your code, thats forbidden"