snoopy

使用pyinstaller打包python源代码,成为linux/windows下可执行文件

泄露秘密 提交于 2020-10-07 01:28:13
pyinstaller,打包python源代码,成为linux/windows下可执行文件,多平台 下载:http://www.pyinstaller.org/static/ http://www.pyinstaller.org/static/source/1.5/ linux用这个:http://www.pyinstaller.org/static/source/1.5/pyinstaller-1.5.tar.bz2 windows用这个:http://www.pyinstaller.org/static/source/1.5/pyinstaller-1.5.zip 下载后解压就可,不需要安装! windows下的使用方法: 1、首先进入cmd命令行下执行: python C:/pyinstaller-1.5/configure.py (这一步是配置pyinstaller) 特别注意:windows下可能会报xxx file or 目录不存在, 这时候把他报错的文件给他建立出来,就能通过了 02、然后用cmd cd命令到你的.py程序所在的目录下。 03、执行: python C:/pyinstaller-1.5/Makespec.py 你的程序名.py --onefile --windowed (参数onefile表示只生成一个文件,有些打包会生成一个exe,以及多个文件;

Daily English Dictation Number Three

纵然是瞬间 提交于 2020-08-04 12:39:52
以下内容同时会在微信公众号同步更新: 电子小彭友 (便于手机随时随地翻阅) 抖音/b站:Darren_pty Coach Shane 是美国的一位帮助热爱英语的人更好地掌握英语的老师,他的微博口号是:“Helping students master english !”。 据我所知,老师已经推出四个作品,按照难度级别分别是:E-cubed(Daily Easy English Expression日常英语轻松表达),Daily English Dictation(DD每日听写),DDM(Daily Dictation Members会员每日听写),PIRF(Pronunciation, Intonation, Rhythm and Flow发音、语调、节奏和流畅);其中DDM和PIRF是收费的,有志提高自己相应能力的朋友可以去听老师的课程,在老师的微博就可以找到报名链接(老师人挺不错,算是帮老师宣传一下吧)。在学习他的DD时,发现视频下面字幕不完整且有部分错误,我就尝试在网上找了一下资源,发现只有一个叫“译学馆”的网站上有DD的字幕(只做了五个视频且大量错误,有时间的同学可以去看一看我说的是这样的情况不)。于是我决定做把自己的分享出来,帮助大家在看Coach Shane老师的DD作品时有不懂的,可以来参照,哈哈。 Daily Dictation 3 听写原文: There’re

Automatically submitting a form with PHP Snoopy

旧城冷巷雨未停 提交于 2020-01-06 19:15:23
问题 I am using the following code to automatically fill in a field and submit a form at another server: <?php include "Snoopy.class.php"; $snoopy = new Snoopy; $snoopy->agent = "Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-CN; rv:1.9.0.5) Gecko/2008120122 Firefox/3.0.5 FirePHP/0.2.1"; $snoopy->referer = "http://www.google.com/"; $url = "http://example.com/?page=a"; $data["field_name"] = "value"; $snoopy->httpmethod = "POST"; $snoopy->submit($url, $data); echo $snoopy->results; ?> The problem is

cURL、file_get_contents、snoopy.class.php 优缺点

不打扰是莪最后的温柔 提交于 2019-12-06 03:50:09
curl()、file_get_contents()、snoopy.class.php这三个远程页面抓取或采集中用到的工具,他们功能相当,到底有什么优缺点呢,下面逐一介绍: snoopy.class.php snoopy 是用 fsockopen 自开发的一个类,效率比较高且不需要服务器特定配置支持,在普通虚拟主机中即可使用,但是经常出问题。官方网址: http://sourceforge.net/projects Snoopy是一个php类,用来模拟浏览器的功能,可以获取网页内容,发送表单。 Snoopy的特点: 1、抓取网页的内容 fetch 2、抓取网页的文本内容 (去除HTML标签) fetchtext 3、抓取网页的链接,表单 fetchlinks fetchform 4、支持代理主机 5、支持基本的用户名/密码验证 6、支持设置 user_agent, referer(来路), cookies 和 header content(头文件) 7、支持浏览器重定向,并能控制重定向深度 8、能把网页中的链接扩展成高质量的url(默认) 9、提交数据并且获取返回值 10、支持跟踪HTML框架 11、支持重定向的时候传递cookies 要求php4以上就可以了,由于本身是php一个类,无需扩支持,服务器不支持curl时候的最好选择。 file_get_contents() file

Creating an object from a class in Codeigniter

只愿长相守 提交于 2019-12-03 08:51:51
问题 The following codes are from http://d.hatena.ne.jp/dix3/20081002/1222899116 and codes are working well. This is an example of using snoopy in codeigniter. Q1. Am I correct to say that I can't use, $this -> load -> library('snoopy') since Snoopy.php does not create an object. And the example below is the way to do it? If so, can you explain/direct me an tutorial or explanation of how to do it in details? if ( ! class_exists('Snoopy')) { require_once(APPPATH.'libraries/Snoopy'.EXT); } Q2. Why

Creating an object from a class in Codeigniter

喜夏-厌秋 提交于 2019-12-02 21:28:50
The following codes are from http://d.hatena.ne.jp/dix3/20081002/1222899116 and codes are working well. This is an example of using snoopy in codeigniter. Q1. Am I correct to say that I can't use, $this -> load -> library('snoopy') since Snoopy.php does not create an object. And the example below is the way to do it? If so, can you explain/direct me an tutorial or explanation of how to do it in details? if ( ! class_exists('Snoopy')) { require_once(APPPATH.'libraries/Snoopy'.EXT); } Q2. Why do the author use $to_specialchars=true Is it needed for this? Q3. Could you explain APPPATH and EXT.

How can I scrape website content in PHP from a website that requires a cookie login?

梦想的初衷 提交于 2019-11-26 20:27:15
My problem is that it doesn't just require a basic cookie, but rather asks for a session cookie, and for randomly generated IDs. I think this means I need to use a web browser emulator with a cookie jar? I have tried to use Snoopy, Goutte and a couple of other web browser emulators, but as of yet I have not been able to find tutorials on how to receive cookies. I am getting a little desperate! Can anyone give me an example of how to accept cookies in Snoopy or Goutte? Thanks in advance! Object-Oriented answer We implement as much as possible of the previous answer in one class called Browser

How can I scrape website content in PHP from a website that requires a cookie login?

不羁岁月 提交于 2019-11-26 09:02:57
问题 My problem is that it doesn\'t just require a basic cookie, but rather asks for a session cookie, and for randomly generated IDs. I think this means I need to use a web browser emulator with a cookie jar? I have tried to use Snoopy, Goutte and a couple of other web browser emulators, but as of yet I have not been able to find tutorials on how to receive cookies. I am getting a little desperate! Can anyone give me an example of how to accept cookies in Snoopy or Goutte? Thanks in advance! 回答1: