selfteaching / selfteaching/selfteaching-python-camp
Day12 定义my_friend的地方如何将他设置为没有任何限制,只要是发信息的就可以调用后续函数?
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 151
- Forks
- 875
- PR merge metrics
- No merged PRs in 30d
Description
from wxpy import *
import requests
from pyquery import PyQuery
import stats_word
bot = Bot()
my_friend=bot.friends().search("欣", keywords=None, **attributes)#
这一步我不想做任何限定,只要是好友给我发信息可以么?
@bot.register(my_firend,SHARING)
def my_friend_sharing(msg):
msg=msg.url
r = requests.get(msg)
document=PyQuery(r.text)
content = document('#js_content').text()
a=stats_word.stats_text(content,100)
b=str(a)
my_friend.send(b)
embed()
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 bot.friends().search(...) and @bot.register(my_firend, SHARING) in the issue, checking how the registration target is selected. Done means messages from any friend can invoke the later function without the name or attribute restriction shown in the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100