safari

B站 自动投币 需要登录后的cookie

你离开我真会死。 提交于 2020-08-07 19:31:40
b站经验获取 如何获得经验值? 投币前 投币后 csrf对应的cookie字段 投币和点赞需要重写headers中的referer, 不然会出错, 即请求是由视频页面发出的 投币 // 投币 export async function coin(aid, multiply = 1, select_like = 0) { const url = "https://api.bilibili.com/x/web-interface/coin/add" headers['referer'] = `https://www.bilibili.com/video/${enc(aid)}` const data = { aid, // av的id号 multiply, // 硬币数目 select_like, // 是否同时喜欢 cross_domain: true, // 跨域 csrf } let resp = await axios.post( url, data, {headers}, ) return resp.data } 点赞 // 点赞 export async function like(aid, like = 1) { headers['referer'] = `https://www.bilibili.com/video/${enc(aid)}` const data = {

AJAX Error: TypeError: 'arguments', 'callee', and 'caller' cannot be accessed in this context

浪尽此生 提交于 2020-08-07 17:16:49
问题 I'm doing an API call on a system and am receiving this error. I can get a response with curl and Postman with the same URL, but safari throws this error when using Angular's $http.get() method. This will also work in production. The error only occurs during development. Searching this error turns up similar, but different questions. 回答1: I found out that this error is actually a X-origin issue. If you are only experiencing this during Dev, in Safari, just disable X-origin restrictions in the

AJAX Error: TypeError: 'arguments', 'callee', and 'caller' cannot be accessed in this context

▼魔方 西西 提交于 2020-08-07 17:11:30
问题 I'm doing an API call on a system and am receiving this error. I can get a response with curl and Postman with the same URL, but safari throws this error when using Angular's $http.get() method. This will also work in production. The error only occurs during development. Searching this error turns up similar, but different questions. 回答1: I found out that this error is actually a X-origin issue. If you are only experiencing this during Dev, in Safari, just disable X-origin restrictions in the

AJAX Error: TypeError: 'arguments', 'callee', and 'caller' cannot be accessed in this context

狂风中的少年 提交于 2020-08-07 17:09:09
问题 I'm doing an API call on a system and am receiving this error. I can get a response with curl and Postman with the same URL, but safari throws this error when using Angular's $http.get() method. This will also work in production. The error only occurs during development. Searching this error turns up similar, but different questions. 回答1: I found out that this error is actually a X-origin issue. If you are only experiencing this during Dev, in Safari, just disable X-origin restrictions in the

【大数据应用技术】作业八|爬虫综合大作业(下)

左心房为你撑大大i 提交于 2020-08-07 15:11:07
本次所以的要求来自: https://edu.cnblogs.com/campus/gzcc/GZCC-16SE2/homework/3075 前言 本次作业是爬取拉勾网python相关岗位的信息,通过爬取岗位id、城市、公司全名、福利待遇、工作地点、学历要求、工作类型、发布时间、职位名称、薪资、工作年限等数据并对其进行数据分析从而得出相应结论。 网页爬虫 1.代理IP 在爬取数据之前我们可以考虑使用代理ip进行爬取,所以这里我写了一段代码检测ip的有效性,这里我使用的是 西刺免费代理ip 进行测试。不过在测试中我发现可用的免费代理ip少之又少,并且时效性较短,用起来不太方便,所以如果有专门的爬虫需求的人可以考虑使用付费ip。 测试代理ip时效性代码如下: import requests import random proxies = { ' http ' : '' } def loadip(): url = ' https: // proxy.horocn.com / api / proxies?order_id = 3JXK1633928414619951 & num = 20 & format = text & line_separator = win & can_repeat = yes ' req = requests.get(url) date = req.json()

Hacker News 简讯 2020-06-29

烈酒焚心 提交于 2020-08-07 12:15:55
最后更新时间: 2020-06-29 22:45 Klutz Press: books built for learning stuff - (charlieharrington.com) 克鲁茨出版社:专为学习而造的书 得分:72 / 评论:16 Arduino FIDO2 Authenticator - (ovcharov.me) Arduino FIDO2验证器 得分:95 / 评论:30 Megadesk - (tindie.com) 巨型办公桌 得分:69 / 评论:34 Neurons that fire together, wire together Ok, but how? - (dissociativediaries.com) 神经元一起放电,连接在一起。好吧,但是怎么做呢? 得分:62 / 评论:22 Windows98 Running in the Browser - (copy.sh) 浏览器中运行的窗口98 得分:341 / 评论:184 Textures.js is a JavaScript library for creating SVG patterns - (riccardoscalco.it) js是一个创建SVG模式的JavaScript库 得分:397 / 评论:32 Console, the vital tool that Apple

python爬虫框架scrapy 豆瓣实战

一曲冷凌霜 提交于 2020-08-07 09:43:24
Scrapy 官方介绍是 An open source and collaborative framework for extracting the data you need from websites. In a fast, simple, yet extensible way. 意思就是 一个开源和协作框架,用于以快速,简单,可扩展的方式从网站中提取所需的数据。 环境准备 本文项目使用环境及工具如下 python3 scrapy mongodb python3 scrapy的安装就不再叙述 mongodb是用来存储数据的nosql非关系型数据库 官方下载地址 https://www.mongodb.com/download-center/community?jmp=docs mongodb图形化管理工具推荐使用nosqlmanager 项目创建 没错,我们还是挑软柿子捏,就爬取最简单的豆瓣电影top250 😂这个网站几乎是每个学习爬虫的人都会去爬取的网站,这个网站特别有代表性 话不多说,项目开始 创建scrapy项目需要在命令行中进行 切换到工作目录,然后输入指令 scrapy startproject douban 即创建成功,然后使用pycharm打开项目 首先看下目录结构 我们发现项目spiders中只有一个文件,放爬虫的地方怎么会只有一个__init__.py呢

[敏杰开发]Beta阶段发布声明

喜夏-厌秋 提交于 2020-08-07 07:29:49
[敏杰开发]Beta阶段发布声明 一、总览 项目名称:知识路书 发布形式:网页应用 发布地址: http://47.94.141.56 (暂定) 二、运行环境与使用方法 本项目基于web浏览器,建议使用常见的电脑端web浏览器,如Google Chrome、Safari。进入 http://47.94.141.56 即可使用 同时我们也在github上开源了此项目,可以访问我们的 github主页 ,下载我们的前后端代码运行,具体配置方法详见github的readme,我们之后会整理一份项目文档,详细描述我们的功能和相应的实现方式。欢迎fork我们的项目并贡献您的代码!!! 三、功能 用户系统 文献管理 路书管理 随笔管理 社区元素 1. 用户系统 与alpha版相比,beta版添加了用户个人中心页面,用户可以编辑个人信息,选择感兴趣的领域以便我们个性化推荐最新论文。另外我们在个人中心中添加了文献统计功能,便于用户制定阅读计划,统计文献的数据等。 2. 文献管理 与alpha版相比,beta版的文献管理更加人性化 增加了多选操作、导出bibtex操作、批量删除操作等。 表格更加简洁明了,采用折叠式面板,平时关闭,当用户想查看详细信息可以取消折叠。 另外我们还添加了阅读计划的功能,用户可以为文献添加 未读 、 进行中 、 已读 等标签。 3. 路书管理 路书是本软件产品的最核心功能

Nginx 反向代理

♀尐吖头ヾ 提交于 2020-08-07 04:22:20
Nginx 细说proxy_set_header $remote_addr和X-Forwarded-For 先来看下proxy_set_header的语法 语法: proxy_set_header field value; 默认值: proxy_set_header Host $proxy_host; proxy_set_header Connection close; 上下文: http, server, location 允许重新定义或者添加发往后端服务器的请求头。value可以包含文本、变量或者它们的组合。 当且仅当当前配置级别中没有定义proxy_set_header指令时,会从上面的级别继承配置。 默认情况下,只有两个请求头会被重新定义: proxy_set_header Host $proxy_host; proxy_set_header Connection close; proxy_set_header也可以自定义参数,如:proxy_set_header test paroxy_test; 如果想要支持下划线的话,需要增加如下配置: underscores_in_headers on; 可以加到http或者server中 语法:underscores_in_headers on|off 默认值:off 使用字段:http, server

PHP判断客户端浏览器类型

让人想犯罪 __ 提交于 2020-08-06 19:46:20
代码如下 <?php /** * 判断浏览器名称和版本 */ function get_user_browser () { if ( empty ($_SERVER[ 'HTTP_USER_AGENT' ])) { return 'error!' ; } if ((strpos($_SERVER[ 'HTTP_USER_AGENT' ], 'MSIE' ) == false ) && (strpos($_SERVER[ 'HTTP_USER_AGENT' ], 'Trident' ) !== FALSE )) { return 'Internet Explorer 11.0' ; } if (strpos($_SERVER[ 'HTTP_USER_AGENT' ], 'MSIE 10.0' ) != false ) { return 'Internet Explorer 10.0' ; } if (strpos($_SERVER[ 'HTTP_USER_AGENT' ], 'MSIE 9.0' ) != false ) { return 'Internet Explorer 9.0' ; } if (strpos($_SERVER[ 'HTTP_USER_AGENT' ], 'MSIE 8.0' ) != false ) { return 'Internet Explorer 8