webpage

Transferring webpage data to an Excel Worksheet using VBA

本小妞迷上赌 提交于 2019-12-23 03:24:10
问题 This is my first post. I am new at VBA but I'm pretty familiar with VB6. I wrote some code that takes the text from nasdaq and pastes it into a worksheet. It finally works. There is a lot of extraneous data scattered around above and below The Annual Income Statement. I would like to parse out and place the important data in a place where I can automate analysis. I'm thinking that I could search the cells until I find: Annual Income Statement and extract to a different sheet. Any suggestions

Send html email using flask in Python

元气小坏坏 提交于 2019-12-23 03:22:22
问题 I want to send HTML webpage as a mail body using Python and Flask. I tried using MIME module, but somehow I am not being able to send mail. If anyone has any expertise on this, can you please help me. It would be great if you could provide some code as well. 回答1: Try using FlaskMail https://pythonhosted.org/flask-mail/ msg = Message( recipients=[''], sender='xx@zz.yy', reply_to='aa@bb.cc', subject=mail.subject ) msg.html = mail.body mail.send(msg) here, mail is an imported file from "mails"

Retrieve image from FTP to webpage

天大地大妈咪最大 提交于 2019-12-23 03:21:27
问题 I have a folder in my ftp server which contains several images. I'm trying to access and show these images in a webpage like <img src="ftp://my_ftp_ip_address/Images/imagename.jpg"/> But it asks for an FTP username and password. How can I achieve this? Also is it possible to do the same using Java? 回答1: With the latest versions of web browsers (Chrome 59, Firefox 61), you cannot even use ftp:// URL to retrieve an image. And it was never a good solution anyway. The correct solution is to route

How do i check if a webpage exists with java?

泄露秘密 提交于 2019-12-23 02:17:18
问题 So here's the deal. I don't have it yet, but starting Friday, I'm in the process of making a forum. What I'd like to do is check to see if a user is registered on the forum. I'm not sure exactly, but lets say the users are stored in URL/users/NAME.WHATEVER (jsp?) how, in java, do i make a URL connection, and check to see if URL/users/Robert.WHATEVER == null? 回答1: Even you could have googled your answer: One simple way is to use the Apache Http Components HttpClient httpclient = new

What's the easiest way to grab a web page in C?

耗尽温柔 提交于 2019-12-22 18:22:06
问题 I'm working on an old school linux variant (QNX to be exact) and need a way to grab a web page (no cookies or login, the target URL is just a text file) using nothing but sockets and arrays. Anyone got a snippet for this? note: I don't control the server and I've got very little to work with besides what is already on the box (adding in additional libraries is not really "easy" given the contraints -- although I do love libcurl) 回答1: I do have some code, but it also supports (Open)SSL so it's

Python urllib,urllib2 fill form

最后都变了- 提交于 2019-12-22 10:05:00
问题 I want to fill a HTML form with urllib2 and urllib . import urllib import urllib2 url = 'site.com/registration.php' values = {'password' : 'password', 'username': 'username' } data = urllib.urlencode(values) req = urllib2.Request(url, data) response = urllib2.urlopen(req) the_page = response.read() But on the end of the form is a button(input type='submit') . If you don't click the button you can't send the data what you wrote in the input(type text) How can I click the button with urllib and

Updating the webpage using Flask based on MySQL database.

随声附和 提交于 2019-12-22 09:48:34
问题 I have a webpage (built using HTML & jQuery) which displays the data from a MySQL database. I am using Flask to connect HTML with my database. However, my database gets updated every 15 minutes (using a separate Python Script). Currently, I stop the flask server, update the database and restart the Flask to update the webpage. My question is the following: Is there a way to update the MySQL database in the background without having to stop the flask server? I read about concepts of AJAX and

How can I print to a label printer from a web page

ぐ巨炮叔叔 提交于 2019-12-22 08:59:22
问题 I have an e-commerce web application and I'd some how like to make that print to a label printer for the back end stuff I have two questions 1) I can't print from a normal webpage straight to the printer (A zedbra LP2844 i think) it just throws out junk 2) I want to be able to print labels to the label printer, but all other printing, such as invoices would go to the default printer - a laser, so need someway of selecting the right printer It will all happen at a fixed location, so I can

Trying to get encoding from a webpage Python and BeautifulSoup

谁都会走 提交于 2019-12-22 00:46:44
问题 Im trying to retrieve the charset from a webpage(this will change all the time). At the moment Im using beautifulSoup to parse the page and then extract the charset from the header. This was working fine until I ran into a site that had..... <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> My code up until now and which was working with other pages is: def get_encoding(soup): encod = soup.meta.get('charset') if encod == None: encod = soup.meta.get('content-type') if encod =

Setting page load timeout in Selenium Python binding

房东的猫 提交于 2019-12-22 00:40:44
问题 I am writing a bot using Python with Selenium module.When I open a webpage with my bot, since the webpage contains too many external sources than dom, it takes a lot to get all of the page loaded. I used the explicit and implicit waits to eliminate this problem since I just wanted a specific element to be loaded and not all of the webpage, it didn't work. The problem is If i run the following statement: driver = webdriver.Firefox() driver.get('somewebpage') elm = WebDriverWait(driver, 5)