一个非官方的sa-mp论坛api

forump的Python项目详细描述


论坛py

GitHub issuesGitHub pull requestsGitHub pull license

forumpy is an unofficial SA-MP forum api.This python library ,integerated with selenium and phantomJS,helps you to automate SA-MP forum acitivities like send and get pms,threads,userinfo,contacts etc.Please view the example files for information about using these features in your python application.forumpy is still under development and has not yet been released.

快速示例

  • 基本

    fromforum.accountimportAccountname=input("Input your forum user name : ")password=input("Input your forum password : ")a=Account(name,password)print("Logined with user id : ",a.id)print("\t**Account info**\n",a.User.info())print("\n\t***Contacts***\n")print("\tId\tUsername")foriina.getcontacts():print("\t",i.id,"\t",i.name)print("\n\t***Threads***\n")print("\tTitle\tRatings\tAuthor")foriina.User.getthreads():print(i.title,"\t",i.getrating(),"\t",i.author.name)
  • 发送和获取私人信息

    fromforum.userimportUserfromforum.accountimportAccountname=input("Input forum username : ")password=input("Input forum password : ")a=Account(name,password)print(a.getpms())rec_names=input("Input name of recipents (seperated by space) : ").split(" ")users=[]forrec_nameinrec_names:users.append(User(a.getIdFromUserName(rec_name)))title=input("Input title : ")content=input("Input content : ")a.send_pm(users,title,content)

Please view examples files for more examples

要求

  • Python3.5+
  • Selenium
  • PhantomJS无头网络驱动程序
  • BeautifulSoup

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java在JSP中添加自定义隐式对象   java MasterMindResource泄漏?   不同的c#java结果加密   java为什么安卓 studio显示“constraintlayout中缺少约束”错误?   java Make Logback将日志打印到文件中   java如何在Google应用程序引擎中设置日期时间?   jeditorpane如何阻止java HTMLEditorKit自动关闭我的标记   返回到Activity onCreate()时,不会调用java函数   java为什么我在这个对象上得到一个NullPointerException?   在java中,如何使用包含数组的参数调用图形方法?   java如何在Play framework 2应用程序中存储Akka参与者列表?   ssh使用java将文件从一个solaris 9复制到另一个solaris 9   网络Java服务器正在等待客户端响应   java Spring mvc从formBackingObject()重定向到页面   java Spark:JavaRDD<Tuple2>到javapairdd<>   java如何动态调用基类中由字符串值指定的子类方法?