MCPcopy Index your code
hub / github.com/geekcomputers/Python / datapullpost

Function datapullpost

insta_monitering/insta_datafetcher.py:78–102  ·  view source on GitHub ↗
(future, url)

Source from the content-addressed store, hash-verified

76
77
78async def datapullpost(future, url):
79 while True:
80
81 @PorxyApplyingDecorator()
82 async def request_pull(url):
83 data = None
84 print(url)
85 urllib3.disable_warnings()
86 user_agent = {"User-agent": "Mozilla/17.0"}
87 try:
88 data = requests.get(
89 url=url, headers=user_agent, timeout=10, verify=False
90 ).text
91 except Exception as e:
92 print(e)
93 data = None
94 finally:
95 return data
96
97 data = await request_pull(url)
98 if data != None:
99 break
100 data = await dataprocess(htmldata=data)
101 # here processing of data has to occur
102 future.set_result(data)
103
104
105class MoniteringClass:

Callers 1

_dataProcessingMethod · 0.85

Calls 2

request_pullFunction · 0.85
dataprocessFunction · 0.85

Tested by

no test coverage detected