一个非官方的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连接usb到uart设备到安卓设备>3.1   可以强制Php中的web应用程序与Java中的桌面应用程序一起工作吗?   java为什么自定义系统类加载器不工作?   数组在Java中解析具有多个分隔符的字符串   PMD Java 8德米特定律   JavaSpringMVC表单验证不适用于嵌套的复杂类型   让Eclipse Java组织导入以使用Google checkstyle   java Appium:无法创建新会话   java如何在数组中声明新字段   java如何解决“无法初始化类org.apache.cassandra.config.DatabaseDescriptor”?   java AsyncTask创建socket   java向@CreatedBy添加更多信息   如何在ubuntu中运行包含大量jars依赖项的java文件   java如何使用<s:select>标记并在中休眠来填充下拉列表?   java获取错误:找不到符号变量“level”和“next_level_button”   javaweb应用中基于UI的ajax显示代码流   Java长到MySql   java JvisualVM:奇怪的应用程序行为   ubuntu将Java程序的输出结果保存到一个文件中