Comments (11)
看样子是redis连接超时了,可以检查你的redis是否设置密码了以及密码是否正确。
from mediacrawler.
我在本地6379端口启动的redis,没有设置密码,配置如下:
config/db_config.py
# redis config
REDIS_DB_HOST = "redis://127.0.0.1" # your redis host
REDIS_DB_PWD = "" # your redis password
# mysql config
RELATION_DB_URL = "mysql://root:youdbpassword@localhost:3306/media_crawler"
# save data to database option
IS_SAVED_DATABASED = False # if you want to save data to database, set True
from mediacrawler.
浅看了一下aioredis
中Client视乎对密码是必填的,意味着你需要先设置下 Redis Server
配置文件的密码,再在db_config.py中配置密码,不能填空字符。
from mediacrawler.
我给redis设置了密码 123456,
再次python main.py --platform xhs --lt qrcode
仍然是上面的错误。
from mediacrawler.
找到原因了,这是一个aioredis
的bug,对python3.11
版本不支持了,稍后我会用redis
模块来替换aioredis,aio-libs-abandoned/aioredis-py#1409
from mediacrawler.
太棒了! 我拉下来,因为这个问题好几天都没启动😂
from mediacrawler.
刚刚还特意用redis-test.py
,做连接redis的测试,发现报错同样和上面一样。
import config
import aioredis
if __name__ == '__main__':
redis_obj = aioredis.from_url(url=config.REDIS_DB_HOST, password=config.REDIS_DB_PWD, decode_responses=True)
value = redis_obj.get("hello")
print(value)
这个坎儿算是过去了,我还以为电脑出问题了😆。
from mediacrawler.
该问题已经修复,已将aioredis
替换为官方的redis
实现,麻烦你拉下最新代码跑跑看,能否启动起来。
from mediacrawler.
OK!
software | version |
---|---|
OS | mac |
python | 3.11 |
$ pip install -r requirements.txt
...
$ python main.py --platform xhs --lt qrcode
2023-07-30 21:03:41 MediaCrawler INFO Begin create browser context ...
2023-07-30 21:03:49 MediaCrawler INFO Begin create xiaohongshu API client ...
2023-07-30 21:03:49 MediaCrawler INFO begin to ping xhs...
2023-07-30 21:03:50 MediaCrawler INFO Begin search xiaohongshu keywords
2023-07-30 21:03:50 MediaCrawler INFO Current keyword: 健身
...
from mediacrawler.
LOGIN_TYPE = 'cookie'
时, COOKIES
我应该怎么设置呢?
from mediacrawler.
LOGIN_TYPE = 'cookie'
时,COOKIES
我应该怎么设置呢?
MediaCrawler/config/base_config.py
Lines 4 to 5 in 1d3c235
from mediacrawler.
Related Issues (20)
- 爬取抖音视频报错 HOT 4
- 这个项目可以实现自动发微博吗 HOT 5
- 插👀 HOT 1
- 如何把数据保存进mysql中 HOT 4
- 运行报错,请问下面是什么问题? HOT 2
- 我首次启动后,弹出来登录二维码,我用小红书 APP 扫码后,登录了。但是提示要手动验证,APP 也没有看到验证的地方。我重启项目后,再次操作,发现登录验证二维码获取不到。 HOT 1
- 抖音使用cookie方式一直登录失败? HOT 2
- cookie报错 HOT 2
- 如何自动下载小红书文章内的图呢? HOT 2
- 求问,如何将查询的结果导出到csv文件呢,求大大解答 HOT 2
- 为何这个关键词在confing里面没有了,不知道为什么? HOT 3
- 小红书只能读取200条左右的数据。 HOT 5
- 求问wb可以指定爬取帖子的时间范围么,例如需要爬取22年3月至6月的内容 HOT 2
- 保存为csv文件时,中文出现乱码 HOT 1
- 请问抖音如何获取到评论的图片? HOT 1
- 小红书搜索结果一直返回{} HOT 2
- dy和xhs二维码登录方式成功率大大降低 HOT 1
- 抖音的接口参数已经更换为a_bogus参数了,抖音相关功能已失效 HOT 4
- 请问如何可以爬取抖音视频数据 HOT 2
- 如何绕开搜索量的限制? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mediacrawler.