beautifulsoup

    1热度

    1回答

    .aspx页面中我是新的网络游戏刮。我想取消以下网站: http://www.foodemissions.com/foodemissions/Calculator.aspx 在互联网上使用的资源,我总结了以下HTTP POST reqeust: import urllib from bs4 import BeautifulSoup headers = { 'Accept':'tex

    0热度

    1回答

    在表格中,我正在刮,第二行非常长,我想简单地限制字符因为我只想要字符串开头的信息。我想刮掉其他行。所以我的代码如下: table = soup.find(id="table3") table_rows = table.findAll('tr') for tr in table_rows: td = tr.findAll('td') row = [i.t

    2热度

    1回答

    我解析某个网页与美丽的汤,尝试检索是H3标签内的所有链接: page = = requests.get(https://www....) soup = BeautifulSoup(page.text, "html.parser") links = [] for item in soup.find_all('h3'): links.append(item.a['href'] 然而,找到的

    0热度

    1回答

    所有 标签我有这样的代码: xml = BeautifulSoup('xml.xml' "html5lib") print(xml.find_all('url')) 但我有恩空数组作为返回的结果 我该怎么办? 这是我的xml文件,以防万一

    0热度

    1回答

    我想从网站自动读取数据,首先我需要填写一些字段,提交表单,然后读取出现的数据。我是新手,但我写了一个代码,显然不工作,结果是HTTP错误500.我在这里错过了什么?或者我如何解决这个问题? 此外,我很高兴使用BS4做到这一点,因为我需要建立在此代码上。 网站:http://www.mlindex.ml.com/GISPublic/bin/SnapShot.asp 输入所需:指数北京时间= H0A0

    0热度

    1回答

    我想从网站使用内置搜索功能,但我一直从主页面获取结果。不知道我做错了什么。 import requests from bs4 import BeautifulSoup body = {'input':'ferris'} # <-- also have tried'query' con = requests.post('http://www.collegedata.com/', data

    0热度

    2回答

    我正在编写一个脚本,每天都会在网页上打开最新的文件。到目前为止我的代码如下: from BeautifulSoup import BeautifulSoup import urllib2 import re html_page = urllib2.urlopen("http://www.baytown.org/city-hall/departments/police/daily-medi

    0热度

    2回答

    我想美丽的汤,我想将它导出到文本文件。 如何将result.txt文件名改为soup.find(class_="entry-title").get_text()的文本? 在此先感谢。 from bs4 import BeautifulSoup as bs import urllib.request #getting the page. url = urllib.request.urlope

    0热度

    1回答

    我使用scrapy检查的某些服装产品我感兴趣的价格和可用性改变 程序本身按预期工作,但现在我。我不知道如何让它不断循环以作为页面监视器工作。我打算租了一个服务器有它运行的不确定状态,如果有一个在可用性或价格变化,它将通过松弛通知我。我只用一个蜘蛛,所以我的代码看起来是这样的: class MonitorSpider(SitemapSpider): name = 'page_monitor

    0热度

    1回答

    我的目标是从链接中获取特定标签的数量,我想要抓取的。我手动检查了标签的数量,我的代码找不到所有的标签。 我试过不同的解析器,如“html.parser”,“html5lib”和“lxml”,但每次都会发生错误。 我的代码: from bs4 import BeautifulSoup from selenium import webdriver urls = ["http://www.baske