We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
能不能帮忙添加进店领金豆任务 任务地址: http://bean.jd.com/myJingBean/list#earnBean
1、获取可领金豆店铺地址: def get_shops(): headers['Referer'] = 'https://home.jd.com/' response = s.get(bean_url, headers=headers) soup = BeautifulSoup(response.text, 'lxml') bean_shop_list = soup.find_all('a', class_='s-btn') return bean_shop_list
2、进店领金豆 def sign_shop(shop_url): try: headers['Referer'] = str(shop_url) response = s.get(shop_url, headers=headers) soup = BeautifulSoup(response.text, 'lxml') # 获取店铺 id shop_id = soup.find(id='shop_id')['value'] # 拼接签到地址 sign_url = 'https://mall.jd.com/shopSign-{}.html'.format(shop_id) s.get(sign_url, headers=headers) print('签到成功:{}'.format(shop_url)) except Exception as error: print('签到失败:{}'.format(shop_url)) print(error)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
能不能帮忙添加进店领金豆任务
任务地址:
http://bean.jd.com/myJingBean/list#earnBean
1、获取可领金豆店铺地址:
def get_shops():
headers['Referer'] = 'https://home.jd.com/'
response = s.get(bean_url, headers=headers)
soup = BeautifulSoup(response.text, 'lxml')
bean_shop_list = soup.find_all('a', class_='s-btn')
return bean_shop_list
2、进店领金豆
def sign_shop(shop_url):
try:
headers['Referer'] = str(shop_url)
response = s.get(shop_url, headers=headers)
soup = BeautifulSoup(response.text, 'lxml')
# 获取店铺 id
shop_id = soup.find(id='shop_id')['value']
# 拼接签到地址
sign_url = 'https://mall.jd.com/shopSign-{}.html'.format(shop_id)
s.get(sign_url, headers=headers)
print('签到成功:{}'.format(shop_url))
except Exception as error:
print('签到失败:{}'.format(shop_url))
print(error)
The text was updated successfully, but these errors were encountered: