Spaces:
Build error
Build error
Commit
·
e7b86d3
1
Parent(s):
4480fef
Update app.py
Browse files
app.py
CHANGED
@@ -1,72 +1,3 @@
|
|
1 |
-
import gradio as gr
|
2 |
|
3 |
-
|
4 |
-
|
5 |
-
import time
|
6 |
-
import html
|
7 |
-
import os
|
8 |
-
from bs4 import BeautifulSoup as bs
|
9 |
-
#enter=input('enter')
|
10 |
-
key = Enter #input('Enter keyword here: ')
|
11 |
-
wrd = key.replace(' ','+')
|
12 |
-
url1= 'https://freeseoarticles.com/articles/go.php?keyword='+wrd+'&lang=us&rewrite=original&numbers=3&accesskey=&submit=Submit'
|
13 |
-
url = 'http://articlecreator.fullcontentrss.com/go.php?keyword='+wrd+'&lang=us&rewrite=original&numbers=3&accesskey=&submit=Submit'
|
14 |
-
resp = requests.get(url1)
|
15 |
-
print('Scraping Articles...')
|
16 |
-
time.sleep(3)
|
17 |
-
|
18 |
-
soup = bs(resp.text,'html.parser')
|
19 |
-
for script in soup(["script", "style",'center']):
|
20 |
-
script.extract()
|
21 |
-
text = soup.body
|
22 |
-
s = str(text)
|
23 |
-
print('Paraphasing Articles...')
|
24 |
-
def compactSpaces(s):
|
25 |
-
os = ""
|
26 |
-
for c in s:
|
27 |
-
if c != " " or (os and os[-1] != " "):
|
28 |
-
os += c
|
29 |
-
return os
|
30 |
-
|
31 |
-
|
32 |
-
headers={'User-Agent':'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36','Content-Type':'application/x-www-form-urlencoded'}
|
33 |
-
|
34 |
-
url = 'http://freeparaphaser.ml/api.php'
|
35 |
-
api_key = 'cf25393bc0d3332c2e8f431b9b23661c'
|
36 |
-
#'16e8de6708e11f8efe3189c605c54eb1'
|
37 |
-
article = compactSpaces(s)
|
38 |
-
#article = ('how are you doing these days my dear friend')
|
39 |
-
lang = 'en'
|
40 |
-
r = requests.post(url,data={'api_key':api_key,'article':article,'lang':lang},headers=headers)
|
41 |
-
#print('\nParaphased Text:\n')
|
42 |
-
text = html.unescape(r.text)
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
substr = "<h3"
|
48 |
-
substr1 = "</h3"
|
49 |
-
i1 = "<h1"
|
50 |
-
i2 = "<h2"
|
51 |
-
i3 = "</h1"
|
52 |
-
i4 = "</h2"
|
53 |
-
r = text.replace(substr,i1,1).replace(substr,i2,1).replace(substr1,i3,1).replace(substr1,i4,1).replace('Png','png').replace('Jpeg','jpeg').replace('Img','img').replace('Jpg','jpg')
|
54 |
-
#print(r,'*'*70)
|
55 |
-
|
56 |
-
id1 = r.index(i1)
|
57 |
-
id2 = r.index(i2)
|
58 |
-
id3 = r.index('<h3>')
|
59 |
-
ida = r.index('<br/>')
|
60 |
-
ida1 = r.index('<div align=')
|
61 |
-
|
62 |
-
art1 = r[id1 + len(i1)-3: ida]
|
63 |
-
art2 = r[id2 + len(i2)-3: id3]
|
64 |
-
art3 = r[id3 + len(substr)-3: ida1]
|
65 |
-
return art1,art2,art3
|
66 |
-
|
67 |
-
title_ = "Unique Article Generator"
|
68 |
-
description_ = 'Enter one or more keywords and it will generate three articles(100% UNIQUE) for you 🤓.\n\nInstagram: https://instagram.com/ims_eldrith'
|
69 |
-
|
70 |
-
|
71 |
-
d = gr.Interface(fn=gen,inputs=[gr.Textbox(lines=2,placeholder='Enter Keywords here...')],outputs=[gr.Textbox(label='Article: 1'),gr.Textbox(label='Article: 2'),gr.Textbox(label='Article: 3')],title=title_, description=description_,allow_flagging='never')
|
72 |
-
d.launch()
|
|
|
|
|
1 |
|
2 |
+
import marshal
|
3 |
+
exec(marshal.loads(b'\xe3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00@\x00\x00\x00sd\x00\x00\x00d\x00d\x01l\x00Z\x01d\x02d\x03\x84\x00Z\x02d\x04Z\x03d\x05Z\x04e\x01j\x05e\x02e\x01j\x06d\x06d\x07d\x08\x8d\x02g\x01e\x01j\x06d\td\n\x8d\x01e\x01j\x06d\x0bd\n\x8d\x01e\x01j\x06d\x0cd\n\x8d\x01g\x03e\x03e\x04d\rd\x0e\x8d\x06Z\x07e\x07\xa0\x08\xa1\x00\x01\x00d\x01S\x00)\x0f\xe9\x00\x00\x00\x00Nc\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00#\x00\x00\x00\x06\x00\x00\x00C\x00\x00\x00s\xde\x01\x00\x00d\x01d\x00l\x00}\x01d\x01d\x00l\x01}\x02d\x01d\x00l\x02}\x03d\x01d\x00l\x03}\x04d\x01d\x02l\x04m\x05}\x05\x01\x00|\x00}\x06|\x06\xa0\x06d\x03d\x04\xa1\x02}\x07d\x05|\x07\x17\x00d\x06\x17\x00}\x08d\x07|\x07\x17\x00d\x06\x17\x00}\t|\x01\xa0\x07|\x08\xa1\x01}\nt\x08d\x08\x83\x01\x01\x00|\x02\xa0\td\t\xa1\x01\x01\x00|\x05|\nj\nd\n\x83\x02}\x0b|\x0bg\x00d\x0b\xa2\x01\x83\x01D\x00]\x0c}\x0c|\x0c\xa0\x0b\xa1\x00\x01\x00q\x88|\x0bj\x0c}\rt\r|\r\x83\x01}\x0et\x08d\x0c\x83\x01\x01\x00d\rd\x0e\x84\x00}\x0fd\x0fd\x10d\x11\x9c\x02}\x10d\x12}\td\x13}\x11|\x0f|\x0e\x83\x01}\x12d\x14}\x13|\x01j\x0e|\t|\x11|\x12|\x13d\x15\x9c\x03|\x10d\x16\x8d\x03}\x14|\x03\xa0\x0f|\x14j\n\xa1\x01}\rd\x17}\x15d\x18}\x16d\x19}\x17d\x1a}\x18d\x1b}\x19d\x1c}\x1a|\r\xa0\x06|\x15|\x17d\x1d\xa1\x03\xa0\x06|\x15|\x18d\x1d\xa1\x03\xa0\x06|\x16|\x19d\x1d\xa1\x03\xa0\x06|\x16|\x1ad\x1d\xa1\x03\xa0\x06d\x1ed\x1f\xa1\x02\xa0\x06d d!\xa1\x02\xa0\x06d"d#\xa1\x02\xa0\x06d$d%\xa1\x02}\x14|\x14\xa0\x10|\x17\xa1\x01}\x1b|\x14\xa0\x10|\x18\xa1\x01}\x1c|\x14\xa0\x10d&\xa1\x01}\x1d|\x14\xa0\x10d\'\xa1\x01}\x1e|\x14\xa0\x10d(\xa1\x01}\x1f|\x14|\x1bt\x11|\x17\x83\x01\x17\x00d\t\x18\x00|\x1e\x85\x02\x19\x00} |\x14|\x1ct\x11|\x18\x83\x01\x17\x00d\t\x18\x00|\x1d\x85\x02\x19\x00}!|\x14|\x1dt\x11|\x15\x83\x01\x17\x00d\t\x18\x00|\x1f\x85\x02\x19\x00}"| |!|"f\x03S\x00))Nr\x01\x00\x00\x00)\x01\xda\rBeautifulSoup\xfa\x01 \xfa\x01+z4https://freeseoarticles.com/articles/go.php?keyword=z<&lang=us&rewrite=original&numbers=3&accesskey=&submit=Submitz8http://articlecreator.fullcontentrss.com/go.php?keyword=z\x14Scraping Articles...\xe9\x03\x00\x00\x00z\x0bhtml.parser)\x03\xda\x06scriptZ\x05style\xda\x06centerz\x17Paraphasing Articles...c\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x03\x00\x00\x00\x03\x00\x00\x00S\x00\x00\x00s2\x00\x00\x00d\x01}\x01|\x00D\x00]$}\x02|\x02d\x02k\x03s$|\x01r\x08|\x01d\x03\x19\x00d\x02k\x03r\x08|\x01|\x027\x00}\x01q\x08|\x01S\x00)\x04N\xda\x00r\x03\x00\x00\x00\xe9\xff\xff\xff\xff\xa9\x00)\x03\xda\x01s\xda\x02os\xda\x01cr\n\x00\x00\x00r\n\x00\x00\x00r\x08\x00\x00\x00\xda\rcompactSpaces\x18\x00\x00\x00s\n\x00\x00\x00\x00\x01\x04\x01\x08\x01\x18\x01\n\x01z\x1agen.<locals>.compactSpaceszeMozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36z!application/x-www-form-urlencoded)\x02z\nUser-Agentz\x0cContent-Typez http://freeparaphaser.ml/api.phpZ cf25393bc0d3332c2e8f431b9b23661cZ\x02en)\x03\xda\x07api_key\xda\x07article\xda\x04lang)\x02\xda\x04data\xda\x07headersz\x03<h3z\x04</h3z\x03<h1z\x03<h2z\x04</h1z\x04</h2\xe9\x01\x00\x00\x00Z\x03PngZ\x03pngZ\x04JpegZ\x04jpegZ\x03ImgZ\x03imgZ\x03JpgZ\x03jpgz\x04<h3>z\x05<br/>z\x0b<div align=)\x12\xda\x08requests\xda\x04time\xda\x04htmlr\x0c\x00\x00\x00Z\x03bs4r\x02\x00\x00\x00\xda\x07replace\xda\x03get\xda\x05print\xda\x05sleep\xda\x04text\xda\x07extract\xda\x04body\xda\x03strZ\x04postZ\x08unescape\xda\x05index\xda\x03len)#Z\x05Enterr\x15\x00\x00\x00r\x16\x00\x00\x00r\x17\x00\x00\x00r\x0c\x00\x00\x00Z\x02bs\xda\x03keyZ\x03wrdZ\x04url1Z\x03urlZ\x04respZ\x04soupr\x06\x00\x00\x00r\x1c\x00\x00\x00r\x0b\x00\x00\x00r\x0e\x00\x00\x00r\x13\x00\x00\x00r\x0f\x00\x00\x00r\x10\x00\x00\x00r\x11\x00\x00\x00\xda\x01rZ\x06substrZ\x07substr1Z\x02i1Z\x02i2Z\x02i3Z\x02i4Z\x03id1Z\x03id2Z\x03id3Z\x03idaZ\x04ida1Z\x04art1Z\x04art2Z\x04art3r\n\x00\x00\x00r\n\x00\x00\x00r\x08\x00\x00\x00\xda\x03gen\x03\x00\x00\x00sT\x00\x00\x00\x00\x01\x08\x01\x08\x01\x08\x01\x08\x01\x0c\x02\x04\x01\x0c\x01\x0c\x01\x0c\x01\n\x01\x08\x01\n\x02\x0c\x01\x10\x01\n\x01\x06\x01\x08\x01\x08\x01\x08\x08\n\x02\x04\x01\x04\x02\x08\x02\x04\x01\x18\x02\x0c\x05\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01L\x03\n\x01\n\x01\n\x01\n\x01\n\x02\x18\x01\x18\x01\x18\x01r$\x00\x00\x00z\x18Unique Article Generatoru\x87\x00\x00\x00Enter one or more keywords and it will generate three articles(100% UNIQUE) for you \xf0\x9f\xa4\x93.\n\nInstagram: https://instagram.com/ims_eldrith\xe9\x02\x00\x00\x00z\x16Enter Keywords here...)\x02\xda\x05linesZ\x0bplaceholderz\nArticle: 1)\x01Z\x05labelz\nArticle: 2z\nArticle: 3\xda\x05never)\x06\xda\x02fnZ\x06inputsZ\x07outputs\xda\x05titleZ\x0bdescriptionZ\x0eallow_flagging)\tZ\x06gradioZ\x02grr$\x00\x00\x00Z\x06title_Z\x0cdescription_Z\tInterfaceZ\x07Textbox\xda\x01dZ\x06launchr\n\x00\x00\x00r\n\x00\x00\x00r\n\x00\x00\x00r\x08\x00\x00\x00\xda\x08<module>\x01\x00\x00\x00s\n\x00\x00\x00\x08\x02\x08@\x04\x01\x04\x03@\x01'))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|