Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/296.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python Can';我在天猫找不到价格合适的阿贾克斯_Python_Web Scraping_Beautifulsoup_Python Requests - Fatal编程技术网

Python Can';我在天猫找不到价格合适的阿贾克斯

Python Can';我在天猫找不到价格合适的阿贾克斯,python,web-scraping,beautifulsoup,python-requests,Python,Web Scraping,Beautifulsoup,Python Requests,正在尝试从以下URL获取促销价格(289) 我读了一些关于AJAX的书,并搜索了一些DOM请求,但是我找不到一种方法来获取价格 from bs4 import BeautifulSoup import urllib3 import requests req = requests.request('GET', 'https://detail.tmall.com/item.htm?spm=a220m.1000858.1000725.1.3cbf57249BnKrJ&id=44577700

正在尝试从以下URL获取促销价格(289)

我读了一些关于AJAX的书,并搜索了一些DOM请求,但是我找不到一种方法来获取价格

from bs4 import BeautifulSoup
import urllib3
import requests

req = requests.request('GET', 'https://detail.tmall.com/item.htm?spm=a220m.1000858.1000725.1.3cbf57249BnKrJ&id=44577700416&skuId=99684796823&standard=1&user_id=330802957&cat_id=2&is_b=1&rn=f7f06abb46583e8c1fca47f5ba972f43')
soup = BeautifulSoup(req.text, 'html.parser')

soup.find_all(class_='tm-price')

你能提供汤的回应吗??我可以阅读它的要求登录汤返回[]你提供的url重定向到登录页面,所以你找不到价格,因为Beauty soup是从登录页面中提取数据,而不是从你想要的页面,我建议你使用mechanize登录,然后将数据传递给Beauty soup