python - 为什么我的 beautifulsoup 解析只是一个元标记?
问题描述
所以我一直在做一些我想尝试用snk
结帐页面测试的东西,我需要 html 代码才能工作,但是当我解析数据时,我看到的只是一个带有元标记的标题。我对这种东西有点陌生,但是有没有办法克服这个并获得实际的 html?
import requests
from bs4 import BeautifulSoup
url = "https://shopnicekicks.com/2192362/checkouts/009e91a67c7040239a40bdaafb11e671?_ga=2.173244707.1809809349.1528354207-1821146214.1528354207"
r = requests.get(url)
soup = BeautifulSoup(r.content, "lxml")
searches = soup.find("div", class_="field__input-wrapper")
print(soup)
print(searches)
这print(soup)
部分是我主要担心的
这是它的输出:
<html>
<head>
<meta content="0; url=https://shopnicekicks.com/2192362/checkouts/009e91a67c7040239a40bdaafb11e671?_ga=2.173244707.1809809349.1528354207-1821146214.1528354207&no_cookies_from_redirect=1" http-equiv="refresh"/>
</head>
</html>
解决方案
推荐阅读
- python - 在python中将文本更改为日期时间
- javascript - 从菜单项加载引导模式(executeJavaScript)
- python - 有没有办法在 PyQt5 的 QPushButton 中设置多个彩色文本?
- bash - 为什么在 sh 终端中执行命令失败
- google-chrome-extension - chrome.runtime.sendMessage 不适用于来自多个选项卡的异步调用
- bash - 在多核上使用 sed 或 awk 在 bash 中批量重命名一百万个文件的更快方法
- node.js - 无法从 Sequelize 读取亚洲/加尔各答时区的数据
- google-drive-api - 将文件标记为用户已查看
- swift - 多次调用时返回视图的函数不会重新初始化返回的视图
- css - Angular routerLink [ng-reflect-router-link] 样式在 prod 模式下未反映在 HTML 中