【问题标题】:I am using beautifulsoup in python 3. But "html.parser" not give me the all code of website我在python 3中使用beautifulsoup。但是“html.parser”没有给我网站的所有代码
【发布时间】:2016-09-06 17:44:33
【问题描述】:

我的代码是

import urllib
import urllib.request

from bs4 import BeautifulSoup    
fed = "https://www.fedex.com/apps/fedextrack/?action=track&tracknumbers=870915037012296&cntry_code=us&wsch=true"

show = urllib.request.urlopen(fed)
soup = BeautifulSoup(show,"html.parser")

print(soup)

我正在尝试从fedex 和status 获取收货地址。但是这段代码没有获取我的URL 的所有数据

【问题讨论】:

  • 您期望哪些代码以及缺少哪些代码?
  • 我希望代码有送货地址、状态、送货日期和送货日期

标签: python-3.x web-scraping beautifulsoup


【解决方案1】:

为什么不直接使用Fedex SOAP API。有一个 Python 包装器 - python-fedex

可以在here找到如何跟踪包裹的示例。

【讨论】:

  • 我不理解 fedex.py 的工作原理。你能给我一个跟踪号码的例子,还请告诉我需要安装哪些库来跟踪fedex包
猜你喜欢
  • 2016-08-01
  • 2023-02-26
  • 2011-03-12
  • 2018-05-15
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2020-08-22
相关资源
最近更新 更多