selfteaching / selfteaching/selfteaching-python-camp
Day12 微信文章返回空值的问题
Open
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 151
- Forks
- 875
- PR merge metrics
- No merged PRs in 30d
Description
我在运行day12作业时,从微信里返回的是

我的代码如下:
@bot.register(my_friend,SHARING) #接受share类信息
def reply_my_friend(msg):
response = requests.get(msg.url)
document = PyQuery(response.text)
content = document('#js_content').text()
#URL信息提取
reply = stats_word.stats_text(content,100)
return reply
#print(reply)
embed() #保持监听状态
我考虑是没有返回str类型吗
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Day12 homework code shown in the issue, especially the SHARING handler and the requests.get(msg.url) to PyQuery flow. Check what content is available at #js_content and what stats_word.stats_text(content, 100) receives; done means the WeChat article produces the expected non-empty reply.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- web-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100