Projects STRLCPY Maryam Commits 048ab6f2
🤬
Revision indexing in progress... (symbol navigation in revisions will be accurate after indexed)
  • ■ ■ ■ ■
    core/util/google.py
    skipped 187 lines
    188 188   
    189 189   @property
    190 190   def links(self):
    191  - links = [x['a'] for x in self.results]
     191 + if self.mode == 'legacy':
     192 + links = [x['a'] for x in self.results]
     193 + else:
     194 + links = [x['a'] for x in self.results_original]
    192 195   return links
    193 196   
    194 197   @property
    skipped 11 lines
  • ■ ■ ■ ■ ■ ■
    modules/search/instagram.py
    skipped 19 lines
    20 20  meta = {
    21 21   'name': 'Instagram Search',
    22 22   'author': 'Aman Singh',
    23  - 'version': '0.5',
     23 + 'version': '0.7',
    24 24   'description': 'Search your query in the Instagram and show the results.',
    25 25   'sources': ('google', 'carrot2', 'bing', 'yippy', 'yahoo', 'millionshort', 'qwant', 'duckduckgo', 'instagram'),
    26 26   'options': (
    27 27   ('query', None, True, 'Query string', '-q', 'store', str),
    28 28   ('limit', 1, False, 'Search limit(number of pages, default=1)', '-l', 'store', int),
    29 29   ('count', 50, False, 'Number of links per page(min=10, max=100, default=50)', '-c', 'store', int),
    30  - ('engine', 'google,instagram', False, 'Engine names for search(default=google, instagram)', '-e', 'store', str),
     30 + ('engine', 'google', False, 'Engine names for search(default=google, instagram)', '-e', 'store', str),
    31 31   ('session_id', None, False, 'Insta Account Session_id for more details results (default="")', '-s', 'store', str),
    32 32   ('thread', 2, False, 'The number of engine that run per round(default=2)', '-t', 'store', int),
    33 33   ),
    skipped 7 lines
    41 41  FOLLOWING = []
    42 42  POST = []
    43 43   
    44  -def search(self, name, q, q_formats, limit, count,session_id):
     44 +def search(self, name, q, q_formats, limit, count, session_id):
    45 45   global PAGES,LINKS,USERDATA,FOLLOWERS,FOLLOWING,POST
    46 46   eng = name
    47 47   query = q
    skipped 10 lines
    58 58   FOLLOWERS = attr.followers
    59 59   FOLLOWING = attr.following
    60 60   POST = attr.post
    61  - 
     61 + USERDATA = attr.userdata
    62 62   # for others
    63 63   else :
    64 64   if 'limit' in varnames and 'count' in varnames:
    skipped 6 lines
    71 71   attr.run_crawl()
    72 72   LINKS += attr.links
    73 73   PAGES += attr.pages
    74  - USERDATA = attr.userdata
    75 74   
    76 75  def module_api(self):
    77 76   query = self.options['query']
    skipped 2 lines
    80 79   session_id = self.options['session_id'] or ''
    81 80   engine = self.options['engine'].split(',')
    82 81   output = {
    83  - 'error': None,
    84 82   'people': [],
    85 83   'posts': [],
    86 84   'hashtags': [],
    skipped 7 lines
    94 92   return
    95 93   
    96 94   q_formats = {
    97  - 'google_q': f"site:www.instagram.com inurl:{query}",
    98 95   'default_q': f"site:www.instagram.com {query}",
     96 + 'google_q': f"site:www.instagram.com inurl:{query}",
    99 97   'yippy_q': f"www.instagram.com {query}",
    100 98   'instagram': f"{query}"
    101 99   }
    skipped 30 lines
    132 130   output['posts'].extend(POST)
    133 131   output['followers'] = FOLLOWERS
    134 132   output['following']= FOLLOWING
     133 + output['links'] = links
    135 134   
    136 135   output = {key: val for key, val in output.items() if val}
    137 136   
    skipped 6 lines
  • ■ ■ ■ ■ ■ ■
    modules/search/quora.py
    skipped 49 lines
    50 50   attr = engine(q)
    51 51   
    52 52   attr.run_crawl()
     53 + if name == 'google':
     54 + LINKS += [(x['a'], x['t']) for x in attr.results_original]
    53 55   LINKS += attr.links
    54 56   
    55 57  def module_api(self):
    skipped 37 lines
    93 95   self.output(title)
    94 96   self.output(f"\t{link}", 'G')
    95 97   print('')
     98 + 
  • ■ ■ ■ ■ ■
    modules/search/qwant.py
    skipped 39 lines
    40 40   
    41 41   run.run_crawl(method)
    42 42   output = {'links': run.links_with_title}
    43  - print(run.links_with_title)
    44 43   self.save_gather(output, 'search/qwant', query, output=self.options['output'])
    45 44   return output
    46 45   
    47 46  def module_run(self):
    48 47   output = module_api(self)
    49  - print(output['links'])
    50 48   for item in output['links']:
    51  - title, link = item[1], item[0]
     49 + title, link = item[0], item[1]
    52 50   self.output(title)
    53 51   self.output(f"\t{link}", 'G')
    54 52   
  • ■ ■ ■ ■ ■
    modules/search/stackoverflow.py
    skipped 92 lines
    93 93  def module_run(self):
    94 94   output = module_api(self)
    95 95   for i in range(len(output['links'])):
    96  - self.output(f"{output['links'][i][1]} \n\t{output['links'][i][0]}", 'G')
     96 + self.output(f"{output['links'][i][1]}")
     97 + self.output(f"\t{output['links'][i][0]}", 'G')
    97 98   output.pop('links')
    98 99   self.alert_results(output)
    99 100   
Please wait...
Page is in error, reload to recover