问题描述
我正在将Log4js与CloudWatch日志一起使用。 但是,多行字符串的某些单个日志每行是分开的。 我该如何解决?
from bs4 import BeautifulSoup
import requests
url = "https://www.rockauto.com/en/catalog/ford,2015,f-150,3.5l+v6+turbocharged,3308773,brake+&+wheel+hub,brake+pad,1684"
response = requests.get(url)
data = response.text
soup = BeautifulSoup(data,'html.parser')
linecodes = soup.find_all('span',class_='listing-final-manufacturer')
partnos = soup.find_all('span',class_='listing-final-partnumber as-link-if-js buyers-guide-color')
descriptions = soup.find_all('span',class_='span-link-underline-remover')
infos = soup.find_all('div',class_='listing-text-row')
for linecode,partno,info,description in zip(linecodes,partnos,infos,descriptions):
result = linecode.text + " | " + partno.text + " | " + info.text + " | " + description.text
print(result)
// version
{
"log4js": "^6.3.0","log4js-extend": "^0.2.1",...
}
谢谢!
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)